Package org.nxplanner.domain

Examples of org.nxplanner.domain.Task


    public TestTask(String name) {
        super(name);
    }

    public void testGetActualHours() {
        Task task = setUpTestTask();
        double hours = task.getActualHours();
        assertEquals("wrong actual hours", 2.0, hours, 0.0);
    }
View Full Code Here


        double hours = task.getActualHours();
        assertEquals("wrong actual hours", 2.0, hours, 0.0);
    }

    public void testGetAdjustedEstimatedHoursWithTimeEntriesLessThanEstimate() {
        Task task = setUpTestTask();
        task.setEstimatedHours(4.0);

        double hours = task.getAdjustedEstimatedHours();
        assertEquals("wrong adjusted estimated hours", 4.0, hours, 0.0);
    }
View Full Code Here

        double hours = task.getAdjustedEstimatedHours();
        assertEquals("wrong adjusted estimated hours", 4.0, hours, 0.0);
    }

    public void testGetAdjustedEstimatedHoursWithTimeEntriesGreaterThanEstimate() {
        Task task = setUpTestTask();
        task.setEstimatedHours(1.0);

        double hours = task.getAdjustedEstimatedHours();
        assertEquals("wrong adjusted estimated hours", 2.0, hours, 0.0);
    }
View Full Code Here

        double hours = task.getAdjustedEstimatedHours();
        assertEquals("wrong adjusted estimated hours", 2.0, hours, 0.0);
    }

    public void testGetAdjustedEstimatedHoursWithoutTimeEntriesAndNotComplete() {
        Task task = new Task();
        task.setEstimatedHours(4.0);
        task.setCompleted(false);
        ArrayList timeEntries = new ArrayList();
        FieldAccessor.set(task, "timeEntries", timeEntries);

        double hours = task.getAdjustedEstimatedHours();
        assertEquals("wrong adjusted estimated hours", 4.0, hours, 0.0);
    }
View Full Code Here

        double hours = task.getAdjustedEstimatedHours();
        assertEquals("wrong adjusted estimated hours", 4.0, hours, 0.0);
    }

    public void testGetAdjustedEstimatedHoursWithoutTimeEntriesAndComplete() {
        Task task = new Task();
        task.setEstimatedHours(4.0);
        task.setCompleted(true);
        ArrayList timeEntries = new ArrayList();
        FieldAccessor.set(task, "timeEntries", timeEntries);

        double hours = task.getAdjustedEstimatedHours();
        assertEquals("wrong adjusted estimated hours", 0.0, hours, 0.0);
    }
View Full Code Here

        double hours = task.getAdjustedEstimatedHours();
        assertEquals("wrong adjusted estimated hours", 0.0, hours, 0.0);
    }

    public void testRemainingHours() {
        Task task = setUpTestTask();
        task.setEstimatedHours(4.0);

        double remainingHours = task.getRemainingHours();
        assertEquals("wrong remaining hours", 2.0, remainingHours, 0.0);
    }
View Full Code Here

        double remainingHours = task.getRemainingHours();
        assertEquals("wrong remaining hours", 2.0, remainingHours, 0.0);
    }

    public void testRemainingHoursWhenOverEstimate() {
        Task task = setUpTestTask();
        task.setEstimatedHours(1.0);

        double remainingHours = task.getRemainingHours();
        assertEquals("wrong remaining hours", 0.0, remainingHours, 0.0);
    }
View Full Code Here

        double remainingHours = task.getRemainingHours();
        assertEquals("wrong remaining hours", 0.0, remainingHours, 0.0);
    }

    public void testOriginalEstimatedHours() {
        Task task = setUpTestTask();
        task.setEstimatedHours(5.0);

        assertEquals("wrong original estimate", 5.0, task.getOriginalEstimatedHours(), 0);

        task.setEstimatedHours(4.0);

        assertEquals("wrong original estimate", 5.0, task.getOriginalEstimatedHours(), 0);
    }
View Full Code Here

        t2.setEndTime(new Date(now + 7200000));
        t2.setDuration(1);
        ArrayList timeEntries = new ArrayList();
        timeEntries.add(t1);
        timeEntries.add(t2);
        Task task = new Task();
        task.setTimeEntries(timeEntries);
        return task;
    }
View Full Code Here

        t2.setEndTime(new Date(now + 7200000));
        ArrayList timeEntries = new ArrayList();
        timeEntries.add(t1);
        timeEntries.add(t2);

        task1 = new Task();
        task1.setEstimatedHours(1.0);
        task1.setOriginalEstimatedHours(2.0);
        task1.setTimeEntries(timeEntries);
        task2 = new Task();
        task2.setEstimatedHours(4.0);
        task2.setOriginalEstimatedHours(3.0);
        task2.setTimeEntries(timeEntries);
        task3 = new Task();
        task3.setEstimatedHours(6.0);
        task3.setOriginalEstimatedHours(4.0);
        task3.setTimeEntries(new ArrayList());
        tasks = new ArrayList();
        tasks.add(task1);
View Full Code Here

TOP

Related Classes of org.nxplanner.domain.Task

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.