Justin Phillips
Justin Phillips

Reputation: 1358

Testing that OptaPlanner constraint generates match weight for a specific score level

I have unit tests that use the following testing API:

constraintVerifier.verifyThat(myConstraint).given(myEntity).penalizesBy(someValue);

But, I would like to be able to also verify it is penalising / rewarding as a Hard, Medium or Soft score. Is there a way to do that?

Thanks in advance.

Upvotes: 0

Views: 220

Answers (1)

Yes and no. You can not do that on a constraint level, but you can do that on a ConstraintProvider level.

Upvotes: 2

Related Questions