I am currently working with dynamic weights configured in a ConstraintConfiguration class. But the class doesn't seem to be used while executing my tests that I wrote. It is however used while actually executing the solver.
For example: one of the weights in the configuration class is 16. While testing for a score of 1, it will not be multiplied with the weight and the result will be 1. But while actually solving, it will use it and it will be 16 as expected.
I am guessing that I'm missing something in my testing class. Do you have to tell the ConstraintVerifier or the testing methods in the testing class that there is a ConstraintConfiguration? Or am I missing something else?
Thanks in advance.
My current constraintverifier:
ConstraintVerifier<ExamScheduleConstraintProvider, ExamSchedule> constraintVerifier = ConstraintVerifier.build(
new ExamScheduleConstraintProvider(), ExamSchedule.class, Exam.class);
Example of test code that won't pass:
constraintVerifier.verifyThat(ExamScheduleConstraintProvider::TestConstraint)
.given(firstExam, secondExam)
.penalizesBy(16);