Java Code Examples for org.jfree.data.time.Minute#getLastMillisecond()

The following examples show how to use org.jfree.data.time.Minute#getLastMillisecond() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MinuteTests.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithTimeZone() {
    Minute m = new Minute(1, 2, 7, 7, 1950);
    TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles");
    Calendar c = new GregorianCalendar(zone);
    assertEquals(-614962680001L, m.getLastMillisecond(c));

    // try null calendar
    boolean pass = false;
    try {
        m.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
Example 2
Source File: MinuteTests.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Minute m = new Minute(45, 21, 21, 4, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    calendar.setTimeZone(TimeZone.getTimeZone("Europe/Frankfurt"));
    assertEquals(987889559999L, m.getLastMillisecond(calendar));

    // try null calendar
    boolean pass = false;
    try {
        m.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}
 
Example 3
Source File: MinuteTests.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithTimeZone() {
    Minute m = new Minute(1, 2, 7, 7, 1950);
    TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles");
    Calendar c = new GregorianCalendar(zone);
    assertEquals(-614962680001L, m.getLastMillisecond(c));
    
    // try null calendar
    boolean pass = false;
    try {
        m.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);            
}
 
Example 4
Source File: MinuteTests.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Some checks for the getLastMillisecond(TimeZone) method.
 */
public void testGetLastMillisecondWithCalendar() {
    Minute m = new Minute(45, 21, 21, 4, 2001);
    GregorianCalendar calendar = new GregorianCalendar(Locale.GERMANY);
    calendar.setTimeZone(TimeZone.getTimeZone("Europe/Frankfurt"));
    assertEquals(987889559999L, m.getLastMillisecond(calendar));
    
    // try null calendar
    boolean pass = false;
    try {
        m.getLastMillisecond((Calendar) null);
    }
    catch (NullPointerException e) {
        pass = true;
    }
    assertTrue(pass);
}