Examples of limitWorkingDay()


Examples of org.libreplan.business.workingday.IntraDayDate.PartialDay.limitWorkingDay()

                    public EffortDuration answer() throws Throwable {
                        PartialDay day = (PartialDay) EasyMock
                                .getCurrentArguments()[0];
                        LocalDate date = day.getDate();
                        if (answersForDates.containsKey(date)) {
                            return day.limitWorkingDay(answersForDates
                                    .get(date).getStandardEffort());
                        }
                        return day.limitWorkingDay(defaultAnswer
                                .getStandardEffort());
                    }
View Full Code Here

Examples of org.libreplan.business.workingday.IntraDayDate.PartialDay.limitWorkingDay()

                        LocalDate date = day.getDate();
                        if (answersForDates.containsKey(date)) {
                            return day.limitWorkingDay(answersForDates
                                    .get(date).getStandardEffort());
                        }
                        return day.limitWorkingDay(defaultAnswer
                                .getStandardEffort());
                    }
                }).anyTimes();

        expect(this.calendar.getCapacityWithOvertime(isA(LocalDate.class)))
View Full Code Here

Examples of org.libreplan.business.workingday.IntraDayDate.PartialDay.limitWorkingDay()

                LocalDate date = day.getDate();
                Capacity capacity = answersForDates.containsKey(date) ? answersForDates
                        .get(date) : defaultAnswer;

                EffortDuration oneResourcePerDayWorkingDuration = day
                        .limitWorkingDay(capacity.getStandardEffort());
                EffortDuration amountRequestedDuration = resourcesPerDay
                        .asDurationGivenWorkingDayOf(oneResourcePerDayWorkingDuration);
                return capacity.limitDuration(amountRequestedDuration);
            }
View Full Code Here

Examples of org.libreplan.business.workingday.IntraDayDate.PartialDay.limitWorkingDay()

                    @Override
                    public EffortDuration answer() throws Throwable {
                        PartialDay day = (PartialDay) getCurrentArguments()[0];
                        if (availability.isValid(day.getDate())) {
                            return day.limitWorkingDay(workingDay);
                        } else {
                            return zero();
                        }
                    }
                }).anyTimes();
View Full Code Here

Examples of org.libreplan.business.workingday.IntraDayDate.PartialDay.limitWorkingDay()

                    @Override
                    public EffortDuration answer() throws Throwable {
                        PartialDay day = (PartialDay) getCurrentArguments()[0];
                        ResourcesPerDay resourcesPerDay = (ResourcesPerDay) getCurrentArguments()[1];
                        if (availability.isValid(day.getDate())) {
                            return day.limitWorkingDay(resourcesPerDay
                                    .asDurationGivenWorkingDayOf(workingDay));
                        } else {
                            return zero();
                        }
                    }
View Full Code Here

Examples of org.libreplan.business.workingday.IntraDayDate.PartialDay.limitWorkingDay()

                    @Override
                    public EffortDuration from(DayAssignment value) {
                        PartialDay partial = getPartialDay(value,
                                startInclusive, endExclusive);
                        return partial.limitWorkingDay(value.getDuration());
                    }

                    private PartialDay getPartialDay(DayAssignment assignment,
                            IntraDayDate startInclusive,
                            IntraDayDate endExclusive) {
View Full Code Here

Examples of org.libreplan.business.workingday.IntraDayDate.PartialDay.limitWorkingDay()

                new IAnswer<EffortDuration>() {

                    @Override
                    public EffortDuration answer() throws Throwable {
                        PartialDay day = (PartialDay) getCurrentArguments()[0];
                        return day.limitWorkingDay(capacityMultipliedByUnits
                                .getStandardEffort());
                    }
                }).anyTimes();
        expect(baseCalendar.isActive(isA(LocalDate.class))).andReturn(true)
                .anyTimes();
View Full Code Here

Examples of org.libreplan.business.workingday.IntraDayDate.PartialDay.limitWorkingDay()

            @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(
                baseCalendar.asDurationOn(isA(PartialDay.class),
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.