From 3c503d0a02bb0479ba4937872cd39362ebd9fd7b Mon Sep 17 00:00:00 2001 From: Rob Johansen Date: Thu, 31 Aug 2023 08:24:28 +0100 Subject: [PATCH] fix impact assertion in constraint verifier --- .../impl/score/stream/DefaultSingleConstraintAssertion.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optaplanner-test/src/main/java/org/optaplanner/test/impl/score/stream/DefaultSingleConstraintAssertion.java b/optaplanner-test/src/main/java/org/optaplanner/test/impl/score/stream/DefaultSingleConstraintAssertion.java index 9f90caf6daf..e825b6ab657 100644 --- a/optaplanner-test/src/main/java/org/optaplanner/test/impl/score/stream/DefaultSingleConstraintAssertion.java +++ b/optaplanner-test/src/main/java/org/optaplanner/test/impl/score/stream/DefaultSingleConstraintAssertion.java @@ -132,13 +132,13 @@ private void assertImpact(ScoreImpactType scoreImpactType, Number matchWeightTot if (actualScoreImpactType == ScoreImpactType.MIXED) { // Impact means we need to check for expected impact type and actual impact match. switch (scoreImpactType) { - case REWARD: + case PENALTY: Number negatedImpact = deducedImpacts.getValue(); if (equalityPredicate.test(matchWeightTotal, negatedImpact)) { return; } break; - case PENALTY: + case REWARD: if (equalityPredicate.test(matchWeightTotal, impact)) { return; }