Class TestGenDroolsExceptionReproducer
- java.lang.Object
-
- org.optaplanner.constraint.drl.testgen.reproducer.TestGenDroolsExceptionReproducer
-
- All Implemented Interfaces:
TestGenOriginalProblemReproducer
public class TestGenDroolsExceptionReproducer extends Object implements TestGenOriginalProblemReproducer
Reproduces the exception originally thrown by Drools during a call to KIE session.
-
-
Constructor Summary
Constructors Constructor Description TestGenDroolsExceptionReproducer(RuntimeException originalException, TestGenDrlScoreDirector<?,?> scoreDirector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertReproducible(TestGenKieSessionJournal journal, String contextDescription)
Throws exception if the original problem is not reproducible with the given journal.boolean
isReproducible(TestGenKieSessionJournal journal)
Replay the journal and decide if the original problem is reproducible.String
toString()
-
-
-
Constructor Detail
-
TestGenDroolsExceptionReproducer
public TestGenDroolsExceptionReproducer(RuntimeException originalException, TestGenDrlScoreDirector<?,?> scoreDirector)
-
-
Method Detail
-
isReproducible
public boolean isReproducible(TestGenKieSessionJournal journal)
Description copied from interface:TestGenOriginalProblemReproducer
Replay the journal and decide if the original problem is reproducible.- Specified by:
isReproducible
in interfaceTestGenOriginalProblemReproducer
- Parameters:
journal
- journal tested for the original problem- Returns:
- true if replaying the journal leads to the original problem
-
assertReproducible
public void assertReproducible(TestGenKieSessionJournal journal, String contextDescription)
Description copied from interface:TestGenOriginalProblemReproducer
Throws exception if the original problem is not reproducible with the given journal.- Specified by:
assertReproducible
in interfaceTestGenOriginalProblemReproducer
- Parameters:
journal
- journal tested for the original problemcontextDescription
- describes the context in which the problem should be reproducible
-
-