Examples of GregorianTimeUnitStack


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

    }

    public void testDayAndHoursTimeFrameEvenBounds() throws Exception {
        Calendar c = (Calendar) GregorianCalendar.getInstance().clone();
        c.set(2000, Calendar.JANUARY, 1, 0, 0);
        GregorianTimeUnitStack stack = new GregorianTimeUnitStack();
        TimeFrame timeFrame = stack.createTimeFrame(c.getTime(),
                GregorianTimeUnitStack.DAY, GregorianTimeUnitStack.HOUR);
        assertEquals(
                "Unexpected number of days in the time frame=" + timeFrame, 1,
                timeFrame.getUnitCount(GregorianTimeUnitStack.DAY));
        assertEquals("Unexpected number of hours in the time frame="
View Full Code Here

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

    }

    public void testDayAndHoursTimeFrameUnevenBounds() throws Exception {
        Calendar c = (Calendar) GregorianCalendar.getInstance().clone();
        c.set(2000, Calendar.JANUARY, 1, 12, 0);
        GregorianTimeUnitStack stack = new GregorianTimeUnitStack();
        TimeFrame timeFrame = stack.createTimeFrame(c.getTime(),
                GregorianTimeUnitStack.DAY, GregorianTimeUnitStack.HOUR);
        assertEquals(
                "Unexpected number of days in the time frame=" + timeFrame, 1,
                timeFrame.getUnitCount(GregorianTimeUnitStack.DAY));
        assertEquals("Unexpected number of hours in the time frame="
View Full Code Here

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

    }

    public void testMonthAndDayFrameEvenBounds() throws Exception {
        Calendar c = (Calendar) GregorianCalendar.getInstance().clone();
        c.set(2000, Calendar.JANUARY, 1, 0, 0);
        GregorianTimeUnitStack stack = new GregorianTimeUnitStack();
        TimeUnit monthUnit = ((TimeUnitFunctionOfDate) GregorianTimeUnitStack.MONTH)
                .createTimeUnit(c.getTime());
        TimeUnit dayUnit = GregorianTimeUnitStack.DAY;
        TimeFrame timeFrame = stack.createTimeFrame(c.getTime(), monthUnit,
                dayUnit);
        assertEquals("Unexpected number of monthes in the time frame="
                + timeFrame, 1, timeFrame.getUnitCount(monthUnit));
        assertEquals(
                "Unexpected number of days in the time frame=" + timeFrame, 31,
View Full Code Here

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

    }

    public void testMonthAndDayFrameUnevenBounds() throws Exception {
        Calendar c = (Calendar) GregorianCalendar.getInstance().clone();
        c.set(2000, Calendar.JANUARY, 16, 0, 0);
        GregorianTimeUnitStack stack = new GregorianTimeUnitStack();
        TimeUnit monthUnit = ((TimeUnitFunctionOfDate) GregorianTimeUnitStack.MONTH)
                .createTimeUnit(c.getTime());
        TimeUnit dayUnit = GregorianTimeUnitStack.DAY;
        TimeFrame timeFrame = stack.createTimeFrame(c.getTime(), monthUnit,
                dayUnit);
        assertEquals("Unexpected number of monthes in the time frame="
                + timeFrame, 1, timeFrame.getUnitCount(monthUnit));
        assertEquals(
                "Unexpected number of days in the time frame=" + timeFrame, 16,
View Full Code Here

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

            public GPCalendar getCalendar() {
                return new AlwaysWorkingTimeCalendarImpl();
            }

            public TimeUnitStack getTimeUnitStack() {
                return new GregorianTimeUnitStack();
            }

            public ResourceManager getResourceManager() {
                return null;
            }
View Full Code Here

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

        return myTaskManager;
    }

    protected void setUp() throws Exception {
        super.setUp();
        myTimeUnitStack = new GregorianTimeUnitStack();
        myTaskManager = newTaskManager();
        myRoleManager = new RoleManagerImpl();
        myResourceManager = new HumanResourceManager(myRoleManager
                .getDefaultRole());
    }
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.