Example usage for org.jfree.data.time Hour getMonth

List of usage examples for org.jfree.data.time Hour getMonth

Introduction

In this page you can find the example usage for org.jfree.data.time Hour getMonth.

Prototype

public int getMonth() 

Source Link

Document

Returns the month in which this hour falls.

Usage

From source file:org.jfree.data.time.HourTest.java

/**
 * Some checks for the testNext() method.
 *///from   w  w  w  . j a  v  a2s .  c  o  m
@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.junit.HourTest.java

/**
 * Some checks for the testNext() method.
 *//*from  w  ww . ja 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());
}