Package com.ibm.icu.util

Examples of com.ibm.icu.util.TimeZone


    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getRawOffset()'
     */
    public void testGetRawOffset() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        int offset = tz.getRawOffset();
        assertEquals(-28800000, offset);
    }
View Full Code Here


    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getID()'
     */
    public void testGetID() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        assertEquals("PST", tz.getID());
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.setID(String)'
     */
    public void testSetID() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        String value1 = tz.getID();
        String value2 = value1 + "!";
        tz.setID(value2);
        String result = tz.getID();
        assertNotEqual(value1, result);
        assertEquals(value2, result);
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getDisplayName()'
     */
    public void testGetDisplayName() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        assertEquals("Pacific Standard Time", tz.getDisplayName());
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getDisplayName(Locale)'
     */
    public void testGetDisplayNameLocale() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        assertEquals("Pacific Standard Time", tz.getDisplayName(Locale.US));
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getDisplayName(ULocale)'
     */
    public void testGetDisplayNameULocale() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        assertEquals("Pacific Standard Time", tz.getDisplayName(ULocale.US));
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getDisplayName(boolean, int)'
     */
    public void testGetDisplayNameBooleanInt() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        assertEquals("PDT", tz.getDisplayName(true, TimeZone.SHORT));
        assertEquals("Pacific Daylight Time", tz.getDisplayName(true, TimeZone.LONG));
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getDisplayName(boolean, int, Locale)'
     */
    public void testGetDisplayNameBooleanIntLocale() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        assertEquals("PDT", tz.getDisplayName(true, TimeZone.SHORT, Locale.US));
        assertEquals("Pacific Daylight Time", tz.getDisplayName(true, TimeZone.LONG, Locale.US));
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getDisplayName(boolean, int, ULocale)'
     */
    public void testGetDisplayNameBooleanIntULocale() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        assertEquals("PDT", tz.getDisplayName(true, TimeZone.SHORT, ULocale.US));
        assertEquals("Pacific Daylight Time", tz.getDisplayName(true, TimeZone.LONG, ULocale.US));
    }
View Full Code Here

    /*
     * Test method for 'com.ibm.icu.util.TimeZone.getDSTSavings()'
     */
    public void testGetDSTSavings() {
        TimeZone tz = TimeZone.getTimeZone("PST");
        assertEquals(3600000, tz.getDSTSavings());
    }
View Full Code Here

TOP

Related Classes of com.ibm.icu.util.TimeZone

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.