From 28699464a073220c5bd6fb6ccdb1e8bd07d5ecb2 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 8ee3022acfb..91a5ad6ce60 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 @@ -113,13 +113,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; }