Examples of onIntervalWithinTask()


Examples of org.libreplan.business.planner.entities.SpecificResourceAllocation.onIntervalWithinTask()

        ResourceAllocation.allocating(allocations).untilAllocating(hours(30));
        SpecificResourceAllocation allocation = (SpecificResourceAllocation) allocations
                .get(0)
                .getBeingModified();
        // hours per day: 8, 8, 8, 6
        allocation.onIntervalWithinTask(startDate.getDate(),
                startDate.getDate().plusDays(1))
                .allocateHours(6);
        // hours per day: 6, 8, 8, 6
        assertTrue(allocation.getResourcesPerDay().getAmount()
                .compareTo(oneResourcePerDay.getAmount()) < 0);
View Full Code Here

Examples of org.libreplan.business.planner.entities.SpecificResourceAllocation.onIntervalWithinTask()

                .allocateHours(6);
        // hours per day: 6, 8, 8, 6
        assertTrue(allocation.getResourcesPerDay().getAmount()
                .compareTo(oneResourcePerDay.getAmount()) < 0);

        allocation.onIntervalWithinTask(startDate.getDate().plusDays(3),
                startDate.getDate().plusDays(4)).allocateHours(8);
        // hours per day: 6, 8, 8, 8
        assertThat(allocation.getResourcesPerDay(), equalTo(oneResourcePerDay));
        // This last assertion is questionable. A solution would be to keep a
        // Spec object at ResourceAllocation with the desired parameters from
View Full Code Here

Examples of org.libreplan.business.planner.entities.SpecificResourceAllocation.onIntervalWithinTask()

        // This last assertion is questionable. A solution would be to keep a
        // Spec object at ResourceAllocation with the desired parameters from
        // the user and then the real values. In the meantime doing an effort to
        // keep the original value

        allocation.onIntervalWithinTask(startDate.getDate().plusDays(4),
                startDate.getDate().plusDays(5))
                .allocateHours(8);
        // hours per day: 6, 8, 8, 8, 8
        assertTrue(allocation.getResourcesPerDay().getAmount()
                .compareTo(oneResourcePerDay.getAmount()) < 0);
View Full Code Here

Examples of org.libreplan.business.planner.entities.SpecificResourceAllocation.onIntervalWithinTask()

        // hours per day: 6, 8, 8, 8, 8
        assertTrue(allocation.getResourcesPerDay().getAmount()
                .compareTo(oneResourcePerDay.getAmount()) < 0);

        // hours per day: 6, 8, 8, 8, 10
        allocation.onIntervalWithinTask(startDate.getDate().plusDays(4),
                startDate.getDate().plusDays(5))
                .allocateHours(10);
        assertThat(allocation.getResourcesPerDay(), equalTo(oneResourcePerDay));
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.SpecificResourceAllocation.onIntervalWithinTask()

                    SpecificResourceAllocation.create(task);
                allocation.setResource(createValidWorker());
                LocalDate start = task.getStartAsLocalDate();
                task.setIntraDayEndDate(IntraDayDate.startOfDay(start
                        .plusDays(3)));
                allocation.onIntervalWithinTask(start, start.plusDays(3))
                        .allocateHours(24);
                assertTrue(allocation.getAssignedHours() > 0);

                task.addResourceAllocation(allocation);
                taskElementDAO.save(taskGroup);
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.