use of org.drools.workbench.models.testscenarios.shared.ExecutionTrace in project drools-wb by kiegroup.
the class ScenarioTestEditorServiceImplTest method loadScenario.
@Test
public void loadScenario() throws Exception {
final URL scenarioResource = getClass().getResource("Are they old enough.scenario");
final Path scenarioPath = PathFactory.newPath(scenarioResource.getFile(), scenarioResource.toURI().toString());
final Scenario loadedScenario = testEditorService.load(scenarioPath);
assertNotNull(loadedScenario);
assertEquals("mortgages.mortgages", loadedScenario.getPackageName());
assertEquals(5, loadedScenario.getFixtures().size());
assertTrue(loadedScenario.getFixtures().get(0) instanceof FactData);
assertTrue(loadedScenario.getFixtures().get(1) instanceof FactData);
assertTrue(loadedScenario.getFixtures().get(2) instanceof FactData);
assertTrue(loadedScenario.getFixtures().get(3) instanceof ExecutionTrace);
assertTrue(loadedScenario.getFixtures().get(4) instanceof VerifyFact);
}
Aggregations