Skip to content

Commit

Permalink
Added test setup validation for GetPositionAllocationsEndingNextThree…
Browse files Browse the repository at this point in the history
…MonthsTest
  • Loading branch information
Jonathanio123 committed Nov 20, 2024
1 parent be4608a commit f5c7661
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ public void GetPositionAllocationsEndingNextThreeMonthsTest()
.Build();
AddPosition(nonEndingPosition);

if (shouldBeIncludedInReport.Distinct().Count() != shouldBeIncludedInReport.Count)
throw new InvalidOperationException($"Test setup error: Duplicate position names in {nameof(shouldBeIncludedInReport)}");

if (positionsToTest.Distinct().Count() != positionsToTest.Count)
throw new InvalidOperationException($"Test setup error: Duplicate positions in {nameof(positionsToTest)}");

#endregion

var data = WeeklyTaskOwnerReportDataCreator.GetPositionAllocationsEndingNextThreeMonths(positionsToTest);
Expand Down

0 comments on commit f5c7661

Please sign in to comment.