public class IndexTestScenarioTest extends BaseIndexingTest<TestScenarioResourceTypeDefinition> {
@Test
public void testIndexTestScenario() throws IOException, InterruptedException {
//Don't ask, but we need to write a single file first in order for indexing to work
final Path basePath = getDirectoryPath().resolveSibling( "someNewOtherPath" );
ioService().write( basePath.resolve( "dummy" ),
"<none>" );
//Add test files
final Path path1 = basePath.resolve( "scenario1.scenario" );
final Scenario model1 = TestScenarioFactory.makeTestScenarioWithVerifyFact( "org.drools.workbench.screens.testscenario.backend.server.indexing",
new ArrayList<Import>() {{
add( new Import( "org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Applicant" ) );
add( new Import( "org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Mortgage" ) );
}},
"scenario1" );
final String xml1 = ScenarioXMLPersistence.getInstance().marshal( model1 );
ioService().write( path1,
xml1 );
final Path path2 = basePath.resolve( "scenario2.scenario" );
final Scenario model2 = TestScenarioFactory.makeTestScenarioWithoutVerifyFact( "org.drools.workbench.screens.testscenario.backend.server.indexing",
new ArrayList<Import>() {{
add( new Import( "org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Applicant" ) );
add( new Import( "org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Mortgage" ) );
}},