org.optaplanner.core.impl.score.director.drools.testgen.reproducer

## Class TestGenDroolsExceptionReproducer

- java.lang.Object
- - org.optaplanner.core.impl.score.director.drools.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 and Description
    `TestGenDroolsExceptionReproducer(RuntimeException originalException, TestGenDroolsScoreDirector<?> scoreDirector)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TestGenDroolsExceptionReproducer

          public TestGenDroolsExceptionReproducer(RuntimeException originalException,
                                                  TestGenDroolsScoreDirector<?> 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 interface `TestGenOriginalProblemReproducer`
      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 interface `TestGenOriginalProblemReproducer`
      Parameters:
        `journal` - journal tested for the original problem
        `contextDescription` - describes the context in which the problem should be reproducible

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.