Examples of asDurationGivenWorkingDayOf()


Examples of org.libreplan.business.workingday.ResourcesPerDay.asDurationGivenWorkingDayOf()

    }

    @Test
    public void ifTheAmountIsZeroMustReturnZero() {
        ResourcesPerDay amount = ResourcesPerDay.amount(BigDecimal.ZERO);
        EffortDuration result = amount.asDurationGivenWorkingDayOf(hours(8));
        assertThat(result, equalTo(zero()));
    }

    @Test
    public void isZeroIfHaveZeroValue() {
View Full Code Here

Examples of org.libreplan.business.workingday.ResourcesPerDay.asDurationGivenWorkingDayOf()

        IAnswer<EffortDuration> durationAnswer = new IAnswer<EffortDuration>() {
            @Override
            public EffortDuration answer() throws Throwable {
                PartialDay day = (PartialDay) getCurrentArguments()[0];
                ResourcesPerDay resourcesPerDay = (ResourcesPerDay) getCurrentArguments()[1];
                return capacityMultipliedByUnits.limitDuration(resourcesPerDay
                        .asDurationGivenWorkingDayOf(day.limitWorkingDay(capacity
                                .getStandardEffort())));
            }
        };
        expect(
View Full Code Here

Examples of org.libreplan.business.workingday.ResourcesPerDay.asDurationGivenWorkingDayOf()

                .resourcesPerDayUntil(plusDays(start, 2))
                .allocate(resourcesPerDay);

        List<GenericDayAssignment> orderedAssignmentsFor = genericResourceAllocation
                .getOrderedAssignmentsFor(worker1);
        int hoursPerDay = resourcesPerDay.asDurationGivenWorkingDayOf(
                EffortDuration.hours(8)).getHours();
        assertThat(orderedAssignmentsFor, haveHours(hoursPerDay, hoursPerDay));
    }

    @Test
View Full Code Here

Examples of org.libreplan.business.workingday.ResourcesPerDay.asDurationGivenWorkingDayOf()

                .resourcesPerDayUntil(plusDays(start, 2))
                .allocate(resourcesPerDay);

        List<GenericDayAssignment> orderedAssignmentsFor = genericResourceAllocation
                .getOrderedAssignmentsFor(worker1);
        int hoursPerDay = resourcesPerDay.asDurationGivenWorkingDayOf(
                EffortDuration.hours(8)).getHours();
        assertThat(orderedAssignmentsFor, haveHours(hoursPerDay, hoursPerDay));
    }

    @Test
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.