Examples of Day


Examples of org.jfree.data.time.Day

    /**
     * Set up a day equal to 1 January 1900.  Request the previous day, it
     * should be null.
     */
    public void test1Jan1900Previous() {
        Day jan1st1900 = new Day(1, MonthConstants.JANUARY, 1900);
        Day previous = (Day) jan1st1900.previous();
        assertNull(previous);
    }
View Full Code Here

Examples of org.jfree.data.time.Day

    /**
     * Set up a day equal to 1 January 1900.  Request the next day, it should
     * be 2 January 1900.
     */
    public void test1Jan1900Next() {
        Day jan1st1900 = new Day(1, MonthConstants.JANUARY, 1900);
        Day next = (Day) jan1st1900.next();
        assertEquals(2, next.getDayOfMonth());
    }
View Full Code Here

Examples of org.jfree.data.time.Day

    /**
     * Set up a day equal to 31 December 9999.  Request the previous day, it
     * should be 30 December 9999.
     */
    public void test31Dec9999Previous() {
        Day dec31st9999 = new Day(31, MonthConstants.DECEMBER, 9999);
        Day previous = (Day) dec31st9999.previous();
        assertEquals(30, previous.getDayOfMonth());
    }
View Full Code Here

Examples of org.jfree.data.time.Day

    /**
     * Set up a day equal to 31 December 9999.  Request the next day, it should
     * be null.
     */
    public void test31Dec9999Next() {
        Day dec31st9999 = new Day(31, MonthConstants.DECEMBER, 9999);
        Day next = (Day) dec31st9999.next();
        assertNull(next);
    }
View Full Code Here

Examples of org.jfree.data.time.Day

        GregorianCalendar gc = new GregorianCalendar(2001, 12, 31);
        SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
        Date reference = format.parse("31/12/2001");
        if (reference.equals(gc.getTime())) {
            // test 1...
            Day d = Day.parseDay("31/12/2001");
            assertEquals(37256, d.getSerialDate().toSerial());
        }

        // test 2...
        Day d = Day.parseDay("2001-12-31");
        assertEquals(37256, d.getSerialDate().toSerial());
    }
View Full Code Here

Examples of org.jfree.data.time.Day

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {
        Day d1 = new Day(15, 4, 2000);
        Day d2 = null;

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

Examples of org.jfree.data.time.Day

    /**
     * Two objects that are equal are required to return the same hashCode.
     */
    public void testHashcode() {
        Day d1 = new Day(1, 2, 2003);
        Day d2 = new Day(1, 2, 2003);
        assertTrue(d1.equals(d2));
        int h1 = d1.hashCode();
        int h2 = d2.hashCode();
        assertEquals(h1, h2);
    }
View Full Code Here

Examples of org.jfree.data.time.Day

    /**
     * The {@link Day} class is immutable, so should not be {@link Cloneable}.
     */
    public void testNotCloneable() {
        Day d = new Day(1, 2, 2003);
        assertFalse(d instanceof Cloneable);
    }
View Full Code Here

Examples of org.jfree.data.time.Day

    /**
     * Some checks for the getSerialIndex() method.
     */
    public void testGetSerialIndex() {
        Day d = new Day(1, 1, 1900);
        assertEquals(2, d.getSerialIndex());
        d = new Day(15, 4, 2000);
        assertEquals(36631, d.getSerialIndex());
    }
View Full Code Here

Examples of org.objectweb.speedo.pobjects.inheritance.prefetch.Day

    Worker worker1 = new Worker("Caroline Bret", 33, "Tetra Pack", true, dept);
    Worker worker2 = new Worker("Evelyne Jain", 54, "Tetra Pack", false, dept);
    Worker worker3 = new Worker("Tim Jorge", 28, "Tetra Pack", false, dept);
   
    Collection days = new ArrayList();
    Day day1 = new Day("monday", 1);
    Day day2 = new Day("tuesday", 2);
    Day day3 = new Day("wednesday", 3);
    Day day4 = new Day("thursday", 4);
    Day day5 = new Day("friday", 5);
    days.add(day1);
    days.add(day2);
    days.add(day3);
    days.add(day4);
    days.add(day5);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.