List of usage examples for org.jfree.data.time Hour getYear
public int getYear()
From source file:org.jfree.data.time.HourTest.java
/** * Some checks for the testNext() method. *///from w w w . ja va2 s .com @Test public void testNext() { Hour h = new Hour(1, 12, 12, 2000); h = (Hour) h.next(); assertEquals(2000, h.getYear()); assertEquals(12, h.getMonth()); assertEquals(12, h.getDayOfMonth()); assertEquals(2, h.getHour()); h = new Hour(23, 31, 12, 9999); assertNull(h.next()); }
From source file:org.jfree.data.time.HourTest.java
/** * Set up an hour equal to hour zero, 1 January 1900. Request the next * hour, it should be null.//w w w. j av a 2 s .co m */ @Test public void testFirstHourNext() { Hour first = new Hour(0, new Day(1, MonthConstants.JANUARY, 1900)); Hour next = (Hour) first.next(); assertEquals(1, next.getHour()); assertEquals(1900, next.getYear()); }
From source file:org.jfree.data.time.HourTest.java
/** * Set up an hour equal to hour zero, 1 January 1900. Request the previous * hour, it should be null.//from w w w . j a v a2s. c om */ @Test public void testLastHourPrevious() { Hour last = new Hour(23, new Day(31, MonthConstants.DECEMBER, 9999)); Hour previous = (Hour) last.previous(); assertEquals(22, previous.getHour()); assertEquals(9999, previous.getYear()); }
From source file:org.jfree.data.time.junit.HourTest.java
/** * Some checks for the testNext() method. *///ww w. j a va 2 s . co m public void testNext() { Hour h = new Hour(1, 12, 12, 2000); h = (Hour) h.next(); assertEquals(2000, h.getYear()); assertEquals(12, h.getMonth()); assertEquals(12, h.getDayOfMonth()); assertEquals(2, h.getHour()); h = new Hour(23, 31, 12, 9999); assertNull(h.next()); }
From source file:org.jfree.data.time.junit.HourTest.java
/** * Set up an hour equal to hour zero, 1 January 1900. Request the next * hour, it should be null.//from w w w .ja v a 2 s. c o m */ public void testFirstHourNext() { Hour first = new Hour(0, new Day(1, MonthConstants.JANUARY, 1900)); Hour next = (Hour) first.next(); assertEquals(1, next.getHour()); assertEquals(1900, next.getYear()); }
From source file:org.jfree.data.time.junit.HourTest.java
/** * Set up an hour equal to hour zero, 1 January 1900. Request the previous * hour, it should be null./*from www . j a v a2s . c om*/ */ public void testLastHourPrevious() { Hour last = new Hour(23, new Day(31, MonthConstants.DECEMBER, 9999)); Hour previous = (Hour) last.previous(); assertEquals(22, previous.getHour()); assertEquals(9999, previous.getYear()); }