Package org.joda.time

Examples of org.joda.time.LocalDate.plusDays()


                Period.days(TASK_DURATION_DAYS)));
        givenGenericResourceAllocationForTask(task);
        givenWorkersWithLoads(
                LoadSpec.withHours(3)
                        .withException(start.plusDays(1), hours(1))
                        .withException(start.plusDays(3), hours(8)),
                LoadSpec.withHours(12).withException(start.plusDays(3), zero()),
                LoadSpec.withHours(1)
                        .withException(start.plusDays(1), hours(3))
                        .withException(start.plusDays(3), hours(8)));
View Full Code Here


        givenGenericResourceAllocationForTask(task);
        givenWorkersWithLoads(
                LoadSpec.withHours(3)
                        .withException(start.plusDays(1), hours(1))
                        .withException(start.plusDays(3), hours(8)),
                LoadSpec.withHours(12).withException(start.plusDays(3), zero()),
                LoadSpec.withHours(1)
                        .withException(start.plusDays(1), hours(3))
                        .withException(start.plusDays(3), hours(8)));

        genericResourceAllocation.forResources(workers).allocate(
View Full Code Here

                LoadSpec.withHours(3)
                        .withException(start.plusDays(1), hours(1))
                        .withException(start.plusDays(3), hours(8)),
                LoadSpec.withHours(12).withException(start.plusDays(3), zero()),
                LoadSpec.withHours(1)
                        .withException(start.plusDays(1), hours(3))
                        .withException(start.plusDays(3), hours(8)));

        genericResourceAllocation.forResources(workers).allocate(
                ResourcesPerDay.amount(1));
View Full Code Here

                        .withException(start.plusDays(1), hours(1))
                        .withException(start.plusDays(3), hours(8)),
                LoadSpec.withHours(12).withException(start.plusDays(3), zero()),
                LoadSpec.withHours(1)
                        .withException(start.plusDays(1), hours(3))
                        .withException(start.plusDays(3), hours(8)));

        genericResourceAllocation.forResources(workers).allocate(
                ResourcesPerDay.amount(1));

        List<GenericDayAssignment> assignmentsWorker1 = genericResourceAllocation
View Full Code Here

        givenTaskWithStartAndEnd(toInterval(start,
                Period.days(TASK_DURATION_DAYS)));
        givenGenericResourceAllocationForTask(task);
        givenWorkersWithLoads(
                LoadSpec.withHours(0)
                        .withException(start.plusDays(3), hours(4)),
                LoadSpec.withHours(12),
                LoadSpec.withHours(1)
                        .withException(start.plusDays(3), hours(0)));

        genericResourceAllocation.forResources(workers).allocate(
View Full Code Here

        givenWorkersWithLoads(
                LoadSpec.withHours(0)
                        .withException(start.plusDays(3), hours(4)),
                LoadSpec.withHours(12),
                LoadSpec.withHours(1)
                        .withException(start.plusDays(3), hours(0)));

        genericResourceAllocation.forResources(workers).allocate(
                ResourcesPerDay.amount(1));

        List<GenericDayAssignment> assignmentsWorker3 = genericResourceAllocation
View Full Code Here

        IntraDayDate end = ResourceAllocation.allocating(
                Arrays.asList(ResourcesPerDayModification.create(
                        genericResourceAllocation,
                        ResourcesPerDay.amount(new BigDecimal(1)), workers)))
                .untilAllocating(hours(12));
        assertThat(end.getDate(), equalTo(start.plusDays(1)));
        EffortDuration biggestLastAssignment = hours(4);
        assertThat(end.getEffortDuration(), equalTo(biggestLastAssignment));
    }

    @Test
View Full Code Here

        givenWorkersWithLoads(8, 2, 6);
        IntraDayDate end = ResourceAllocation.allocating(
                Arrays.asList(ResourcesPerDayModification.create(
                        genericResourceAllocation, ResourcesPerDay.amount(1),
                        workers))).untilAllocating(hours(16));
        assertThat(end.getDate(), equalTo(start.plusDays(2)));
    }

    private void givenVirtualWorkerWithCapacityAndLoad(
            Capacity capacityPerDayAndUnit,
            int capacityUnits,
View Full Code Here

                equalTo(workableHoursDay * days));

        final int hoursOnSubinterval = 3;
        int daysSubinterval = 2;
        genericResourceAllocation.forResources(workers)
                .onIntervalWithinTask(start, start.plusDays(daysSubinterval))
                .allocateHours(hoursOnSubinterval);
        assertThat(genericResourceAllocation.getAssignedHours(),
                equalTo(hoursOnSubinterval + (days - daysSubinterval)
                        * workableHoursDay));
    }
View Full Code Here

        final int hoursOnSubinterval = 3;
        int daysSubinterval = 2;
        genericResourceAllocation.withPreviousAssociatedResources().onIntervalWithinTask(
                start,
                start.plusDays(daysSubinterval)).allocateHours(
                hoursOnSubinterval);
        assertThat(genericResourceAllocation.getAssignedHours(),
                equalTo(hoursOnSubinterval + (days - daysSubinterval)
                        * workableHoursDay));
    }
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.