Examples of WeekFramerImpl


Examples of net.sourceforge.ganttproject.time.gregorian.WeekFramerImpl

/**
* @author bard
*/
public class TestWeekFramer extends TestCase {
    public void testAdjustLeft() {
        WeekFramerImpl framer = new WeekFramerImpl();
        Date adjusted = framer.adjustLeft(newMonday());
        Calendar c = (Calendar) Calendar.getInstance().clone();
        c.setTime(adjusted);
        c.add(Calendar.MILLISECOND, -1);
        assertEquals("Unexpected day of week", Calendar.SUNDAY, c
                .get(Calendar.DAY_OF_WEEK));
        //
        Date adjustedSunday = framer.adjustLeft(newSunday());
        assertEquals(
                "Adjusted sunday is expected to be equal to adjusted monday",
                adjusted, adjustedSunday);
    }
View Full Code Here

Examples of net.sourceforge.ganttproject.time.gregorian.WeekFramerImpl

                "Adjusted sunday is expected to be equal to adjusted monday",
                adjusted, adjustedSunday);
    }

    public void testAdjustRight() {
        WeekFramerImpl framer = new WeekFramerImpl();
        Date adjustedMonday = framer.adjustRight(newMonday());
        Date adjustedSunday = framer.adjustRight(newSunday());
        assertEquals(adjustedMonday, adjustedSunday);
        Calendar c = (Calendar) Calendar.getInstance().clone();
        c.setTime(adjustedMonday);
        assertEquals("Unexpected day of week", Calendar.MONDAY, c
                .get(Calendar.DAY_OF_WEEK));
View Full Code Here

Examples of net.sourceforge.ganttproject.time.gregorian.WeekFramerImpl

        assertEquals("Unexpected day of week", Calendar.SUNDAY, c
                .get(Calendar.DAY_OF_WEEK));
    }

    public void testJumpLeft() {
        WeekFramerImpl framer = new WeekFramerImpl();
        Date adjustedMonday = framer.jumpLeft(newMonday());
        Date adjustedSunday = framer.jumpLeft(newSunday());
        assertNotSame(adjustedMonday, adjustedSunday);
        Calendar c = (Calendar) Calendar.getInstance().clone();
        c.setTime(adjustedMonday);
        assertTrue("Unexpected day of week, date=" + c.getTime(),
                Calendar.MONDAY == c.get(Calendar.DAY_OF_WEEK));
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.