Package org.nxplanner.domain

Examples of org.nxplanner.domain.TimeEntry


    protected void setUp() throws Exception {
        super.setUp();
        support = new XPlannerTestSupport();
        support.setForward(AbstractAction.TYPE_KEY, UserStory.class.getName());
        long now = new Date().getTime();
        TimeEntry t1 = new TimeEntry();
        t1.setStartTime(new Date(now - 3600000));
        t1.setEndTime(new Date(now));
        TimeEntry t2 = new TimeEntry();
        t2.setStartTime(new Date(now + 3600000));
        t2.setEndTime(new Date(now + 7200000));
        ArrayList timeEntries = new ArrayList();
        timeEntries.add(t1);
        timeEntries.add(t2);

        task1 = new Task();
View Full Code Here


        ActionForward forward = support.executeAction(action);

        verify();
        assertTrue("object not inserted", mockSession.saveCalled);
        TimeEntry entry = (TimeEntry)mockSession.saveObject;
        assertEquals("wrong start time", dateTimeFormat.parse(DATE_1a), entry.getStartTime());
        assertEquals("wrong start time", dateTimeFormat.parse(DATE_2a), entry.getEndTime());
        assertEquals("wrong report date", dateFormat.parse(DATE_1c), entry.getReportDate());
        assertEquals("wrong person id", 1, entry.getPerson1Id());
        assertEquals("wrong person id", 2, entry.getPerson2Id());
        assertEquals("wrong forward", "estimate.jsp", forward.getPath());
        assertTrue("redirected", !forward.getRedirect());
        assertTrue("txn commit not called", support.connection.commitCalled);
        assertTrue("reset called", !editorForm.resetCalled);
    }
View Full Code Here

        assertTrue("txn commit not called", support.connection.commitCalled);
    }

    private void setUpTimeEntries() throws Exception {
        ArrayList entries = new ArrayList();
        timeEntry1 = new TimeEntry(1);
        timeEntry1.setStartTime(dateTimeFormat.parse(DATE_1a));
        timeEntry1.setEndTime(dateTimeFormat.parse(DATE_1b));
        timeEntry1.setReportDate(dateFormat.parse(DATE_1c));
        timeEntry1.setPerson1Id(1);
        timeEntry1.setPerson2Id(2);
        entries.add(timeEntry1);
        timeEntry2 = new TimeEntry(2);
        timeEntry2.setStartTime(dateTimeFormat.parse(DATE_2a));
        timeEntry2.setReportDate(dateFormat.parse(DATE_2b));
        entries.add(timeEntry2);
        mockSession.find2Return = entries;
    }
View Full Code Here

TOP

Related Classes of org.nxplanner.domain.TimeEntry

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.