improve comment

This commit is contained in:
Geoffrey De Smet 2023-11-24 21:17:46 +01:00
parent 783d9dbd01
commit 3df51484f2
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ class ShiftScheduleConstraintProviderTest {
ann,
new Shift(MONDAY.atTime(6, 0), MONDAY.atTime(14, 0), null, ann),
new Shift(MONDAY.atTime(14, 0), MONDAY.atTime(22, 0), null, ann))
// Penalizes both A-B and B-A. To avoid that, use forEachUniquePair() in the constraint instead.
// Penalizes by 2 because both {shiftA, shiftB} and {shiftB, shiftA} match.
// To avoid that, use forEachUniquePair() in the constraint instead.
.penalizesBy(2);
constraintVerifier.verifyThat(ShiftScheduleConstraintProvider::atMostOneShiftPerDay)
.given(