From 3df51484f27a8ee07507d827df34f17c8e80af6f Mon Sep 17 00:00:00 2001 From: Geoffrey De Smet Date: Fri, 24 Nov 2023 21:17:46 +0100 Subject: [PATCH] improve comment --- .../timefoldsolver/ShiftScheduleConstraintProviderTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/timefold-solver/src/test/java/com/baeldung/timefoldsolver/ShiftScheduleConstraintProviderTest.java b/timefold-solver/src/test/java/com/baeldung/timefoldsolver/ShiftScheduleConstraintProviderTest.java index 9979f5d5e0..9477e892eb 100644 --- a/timefold-solver/src/test/java/com/baeldung/timefoldsolver/ShiftScheduleConstraintProviderTest.java +++ b/timefold-solver/src/test/java/com/baeldung/timefoldsolver/ShiftScheduleConstraintProviderTest.java @@ -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(