From 9e8f67ad03ba65f772f390ff6b1035353742091f Mon Sep 17 00:00:00 2001 From: Geoffrey De Smet Date: Sat, 2 Dec 2023 12:03:19 +0100 Subject: [PATCH] Improve forEachUniquePair comment further --- .../timefoldsolver/ShiftScheduleConstraintProviderUnitTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timefold-solver/src/test/java/com/baeldung/timefoldsolver/ShiftScheduleConstraintProviderUnitTest.java b/timefold-solver/src/test/java/com/baeldung/timefoldsolver/ShiftScheduleConstraintProviderUnitTest.java index fbe6ebccaf..2f929ace34 100644 --- a/timefold-solver/src/test/java/com/baeldung/timefoldsolver/ShiftScheduleConstraintProviderUnitTest.java +++ b/timefold-solver/src/test/java/com/baeldung/timefoldsolver/ShiftScheduleConstraintProviderUnitTest.java @@ -21,7 +21,7 @@ class ShiftScheduleConstraintProviderUnitTest { constraintVerifier.verifyThat(ShiftScheduleConstraintProvider::atMostOneShiftPerDay) .given(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 by 2 because both {shiftA, shiftB} and {shiftB, shiftA} match. - // To avoid that, use forEachUniquePair() in the constraint instead of forEach().join() in the implementation. + // To avoid that, use forEachUniquePair(Shift) instead of forEach(Shift).join(Shift) in ShiftScheduleConstraintProvider.atMostOneShiftPerDay(). .penalizesBy(2); }