Frank Förster
unread,Jan 20, 2022, 6:09:09 AM1/20/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OptaPlanner development
Hi Optaplanners,
I have to use the impact() method as a constraint stream result to create soft scores because the score value is given from an external system an can be both, negative and positive - Works fine!
Unfortunately I can not unit test this stream with the ConstraintVerifier, no method impactedWith(...) is available. If I use rewardsWith() to test an impact of +1 I get an AssertionError:
Expected reward: 1 (class java.lang.Integer)
Actual impact: 1 (class java.lang.Integer)
Is there a way to test this or does anybody knows if it is planned to extend the verifier for impacts or to allow impact tests with rewardsWith()?
Thanks in advance,
Frank