Skip to content

Commit

Permalink
Added CreateTimelineFilteredByFamilyIdWithPauses unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloDinella committed Jan 9, 2025
1 parent 8582c33 commit abdf075
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,38 @@ public void CreateTimelineFilteredByFamilyIdNoPauses()
);
}

[TestMethod]
public void CreateTimelineFilteredByFamilyIdWithPauses()
{
var result = ReferralCalculations.CreateChildLocationBasedTimeline(
H.ChildLocationHistory(
(H.Id('0'), ChildLocationPlan.DaytimeChildCare, 1, 1),
(H.Id('1'), ChildLocationPlan.DaytimeChildCare, 1, 10),
(H.Id('2'), ChildLocationPlan.WithParent, 1, 12),
(H.Id('1'), ChildLocationPlan.DaytimeChildCare, 1, 15),
(H.Id('2'), ChildLocationPlan.WithParent, 1, 20)
)
.ToImmutableList(),
H.Id('1')
);

AssertEx.SequenceIs(
result,
new DateOnlyTimeline(
[
new DateRange(
DateOnly.FromDateTime(H.DateTime(1, 10)),
DateOnly.FromDateTime(H.DateTime(1, 12))
),
new DateRange(
DateOnly.FromDateTime(H.DateTime(1, 15)),
DateOnly.FromDateTime(H.DateTime(1, 20))
),
]
)
);
}

[TestMethod]
public void CreateTimelineFilteredByFamilyIdMultipleChangesInSameDay()
{
Expand Down

0 comments on commit abdf075

Please sign in to comment.