Add test for fromStartUntil

FEA: ItEr62OTS04PlanificacionHaciaAtras
This commit is contained in:
Óscar González Fernández 2010-10-29 12:32:32 +02:00
parent 70150fd9d7
commit 9d0bc64dd9

View file

@ -293,6 +293,18 @@ public class SpecificResourceAllocationTest {
assertThat(specificResourceAllocation.getAssignments(), haveHours(5, 5));
}
@Test
public void canAssignFromStartUntilEnd() {
LocalDate start = new LocalDate(2000, 2, 4);
givenSpecificResourceAllocation(start, 4);
specificResourceAllocation.fromStartUntil(start.plusDays(4))
.allocateHours(32);
assertThat(specificResourceAllocation.getAssignments(),
haveHours(8, 8, 8, 8));
assertThat(specificResourceAllocation.getResourcesPerDay(),
equalTo(ResourcesPerDay.amount(1)));
}
@Test
public void canBeNotifiedWhenADayAssignmentIsRemoved() {
LocalDate start = new LocalDate(2000, 2, 4);