Bug #1329: Fix problem in StretchesFunctionTest due to changes in previous test

The mockup created to represent ResourceAllocation should return valid values
for methods getIntraDayStartDate() and getIntraDayEndDate().

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-01-12 08:07:53 +01:00
parent 65b24f8099
commit c9356c71c7

View file

@ -40,6 +40,8 @@ import org.libreplan.business.planner.entities.ResourceAllocation;
import org.libreplan.business.planner.entities.Stretch;
import org.libreplan.business.planner.entities.StretchesFunction;
import org.libreplan.business.planner.entities.StretchesFunction.Interval;
import org.libreplan.business.workingday.EffortDuration;
import org.libreplan.business.workingday.IntraDayDate;
/**
* Tests for {@link StretchesFunction} entity.
@ -59,6 +61,12 @@ public class StretchesFunctionTest {
expect(resourceAllocation.getStartDate()).andReturn(START_DATE).anyTimes();
expect(resourceAllocation.getEndDate()).andReturn(END_DATE).anyTimes();
expect(resourceAllocation.getIntraDayStartDate()).andReturn(
IntraDayDate.create(START_DATE, EffortDuration.zero()))
.anyTimes();
expect(resourceAllocation.getIntraDayEndDate()).andReturn(
IntraDayDate.create(END_DATE, EffortDuration.zero()))
.anyTimes();
replay(resourceAllocation);
return resourceAllocation;