Package org.jfree.data.time

Examples of org.jfree.data.time.Hour


     * Problem for date parsing.
     */
    public void testParseHour() {

        // test 1...
        final Hour h = Hour.parseHour("2002-01-29 13");
        assertEquals(13, h.getHour());

    }
View Full Code Here


    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        final Hour h1 = new Hour();
        Hour h2 = null;

        try {
            final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            final ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(h1);
View Full Code Here

    /**
     * Two objects that are equal are required to return the same hashCode.
     */
    public void testHashcode() {
        final Hour h1 = new Hour(7, 9, 10, 1999);
        final Hour h2 = new Hour(7, 9, 10, 1999);
        assertTrue(h1.equals(h2));
        final int hash1 = h1.hashCode();
        final int hash2 = h2.hashCode();
        assertEquals(hash1, hash2);
    }
View Full Code Here

    /**
     * Tests the equals method.
     */
    public void testEquals() {
        final Day day1 = new Day(29, SerialDate.MARCH, 2002);
        final Hour hour1 = new Hour(15, day1);
        final Minute minute1 = new Minute(15, hour1);
        final Second second1 = new Second(34, minute1);
        final Day day2 = new Day(29, SerialDate.MARCH, 2002);
        final Hour hour2 = new Hour(15, day2);
        final Minute minute2 = new Minute(15, hour2);
        final Second second2 = new Second(34, minute2);
        assertTrue(second1.equals(second2));
    }
View Full Code Here

    /**
     * Tests the equals method.
     */
    public void testEquals() {
        final Day day1 = new Day(29, SerialDate.MARCH, 2002);
        final Hour hour1 = new Hour(15, day1);
        final Minute minute1 = new Minute(15, hour1);
        final Day day2 = new Day(29, SerialDate.MARCH, 2002);
        final Hour hour2 = new Hour(15, day2);
        final Minute minute2 = new Minute(15, hour2);
        assertTrue(minute1.equals(minute2));
    }
View Full Code Here

    /**
     * Tests the equals method.
     */
    public void testEquals() {
        Day day1 = new Day(29, MonthConstants.MARCH, 2002);
        Hour hour1 = new Hour(15, day1);
        Minute minute1 = new Minute(15, hour1);
        Second second1 = new Second(34, minute1);
        Millisecond milli1 = new Millisecond(999, second1);
        Day day2 = new Day(29, MonthConstants.MARCH, 2002);
        Hour hour2 = new Hour(15, day2);
        Minute minute2 = new Minute(15, hour2);
        Second second2 = new Second(34, minute2);
        Millisecond milli2 = new Millisecond(999, second2);
        assertTrue(milli1.equals(milli2));
    }
View Full Code Here

    /**
     * Tests the equals method.
     */
    public void testEquals() {
        Day day1 = new Day(29, MonthConstants.MARCH, 2002);
        Hour hour1 = new Hour(15, day1);
        Minute minute1 = new Minute(15, hour1);
        Second second1 = new Second(34, minute1);
        Day day2 = new Day(29, MonthConstants.MARCH, 2002);
        Hour hour2 = new Hour(15, day2);
        Minute minute2 = new Minute(15, hour2);
        Second second2 = new Second(34, minute2);
        assertTrue(second1.equals(second2));
    }
View Full Code Here

    /**
     * Tests the equals method.
     */
    public void testEquals() {
        Day day1 = new Day(29, MonthConstants.MARCH, 2002);
        Hour hour1 = new Hour(15, day1);
        Minute minute1 = new Minute(15, hour1);
        Day day2 = new Day(29, MonthConstants.MARCH, 2002);
        Hour hour2 = new Hour(15, day2);
        Minute minute2 = new Minute(15, hour2);
        assertTrue(minute1.equals(minute2));
    }
View Full Code Here

     * Check that an Hour instance is equal to itself.
     *
     * SourceForge Bug ID: 558850.
     */
    public void testEqualsSelf() {
        Hour hour = new Hour();
        assertTrue(hour.equals(hour));
    }
View Full Code Here

    /**
     * Tests the equals method.
     */
    public void testEquals() {
        Hour hour1 = new Hour(15, new Day(29, MonthConstants.MARCH, 2002));
        Hour hour2 = new Hour(15, new Day(29, MonthConstants.MARCH, 2002));
        assertTrue(hour1.equals(hour2));
    }
View Full Code Here

TOP

Related Classes of org.jfree.data.time.Hour

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.