Unit test for insertedFact in optaplanner

80 views Asked by At

How do we unit test rules in optaplanner that depend on insertedFact?

As per the examples for drools, its inserting fact using session object and then unit testing the actual rule. How can we access session object in optaplanner? I am creating SolverFactory using xml resource.

1

There are 1 answers

0
Geoffrey De Smet On

Take a look at ScoreVerifier, explained in the docs. It's part of optaplanner-test.jar.