@Test public void runAllTests() throws Exception { Map<Path, ScenarioSimulationModel> scenarioSimulationMap = new HashMap<>(); scenarioSimulationMap.put(mock(Path.class), makeScenarioSimulationModel(true)); scenarioSimulationMap.put(mock(Path.class), makeScenarioSimulationModel(false)); when(scenarioLoaderMock.loadScenarios(any())).thenReturn(scenarioSimulationMap); List<TestResultMessage> testResultMessages = scenarioRunnerService.runAllTests("test", mock(Path.class)); assertNotNull(testResultMessages); assertEquals(1, testResultMessages.size()); }
@Override public List<TestResultMessage> runAllTests(final String identifier, final Path path) { final List<TestResultMessage> testResultMessages = new ArrayList<>(); for (Map.Entry<Path, ScenarioSimulationModel> entry : scenarioLoader.loadScenarios(path).entrySet()) { final Simulation simulation = entry.getValue().getSimulation(); final Settings settings = entry.getValue().getSettings(); if (!settings.isSkipFromBuild()) { testResultMessages.add(runTest(identifier, entry.getKey(), simulation.getScesimModelDescriptor(), simulation.getScenarioWithIndex(), settings, entry.getValue().getBackground()) .getTestResultMessage()); } } return testResultMessages; }
ScenarioRunnerServiceImpl extends AbstractKieContainerService implements ScenarioRunnerService { @Override public List<TestResultMessage> runAllTests(final String identifier, final Path path) { final List<TestResultMessage> testResultMessages = new ArrayList<>(); for (Map.Entry<Path, ScenarioSimulationModel> entry : scenarioLoader.loadScenarios(path).entrySet()) { final Simulation simulation = entry.getValue().getSimulation(); final Settings settings = entry.getValue().getSettings(); if (!settings.isSkipFromBuild()) { testResultMessages.add(runTest(identifier, entry.getKey(), simulation.getScesimModelDescriptor(), simulation.getScenarioWithIndex(), settings, entry.getValue().getBackground()) .getTestResultMessage()); } } return testResultMessages; } }
ScenarioRunnerServiceImpl extends AbstractKieContainerService implements ScenarioRunnerService { @Override public List<TestResultMessage> runAllTests(final String identifier, final Path path) { final List<TestResultMessage> testResultMessages = new ArrayList<>(); for (Map.Entry<Path, ScenarioSimulationModel> entry : scenarioLoader.loadScenarios(path).entrySet()) { final Simulation simulation = entry.getValue().getSimulation(); final Settings settings = entry.getValue().getSettings(); if (!settings.isSkipFromBuild()) { testResultMessages.add(runTest(identifier, entry.getKey(), simulation.getScesimModelDescriptor(), simulation.getScenarioWithIndex(), settings, entry.getValue().getBackground()) .getTestResultMessage()); } } return testResultMessages; }  }
ScenarioRunnerServiceImpl extends AbstractKieContainerService implements ScenarioRunnerService { @Override public List<TestResultMessage> runAllTests(final String identifier, final Path path) { final List<TestResultMessage> testResultMessages = new ArrayList<>(); for (Map.Entry<Path, ScenarioSimulationModel> entry : scenarioLoader.loadScenarios(path).entrySet()) { final Simulation simulation = entry.getValue().getSimulation(); final Settings settings = entry.getValue().getSettings(); if (!settings.isSkipFromBuild()) { testResultMessages.add(runTest(identifier, entry.getKey(), simulation.getScesimModelDescriptor(), simulation.getScenarioWithIndex(), settings, entry.getValue().getBackground()) .getTestResultMessage()); } } return testResultMessages; }  @Override List<TestResultMessage> runAllTests(final String identifier,
                                               final Path path); @Override SimulationRunResult runTest(final String identifier,
                                       final Path path,
                                       final ScesimModelDescriptor simulationDescriptor,
                                       final List<ScenarioWithIndex> scenarios,
                                       final Settings settings,
                                       final Background background); ScenarioRunnerProvider getOrCreateRunnerSupplier(ScenarioSimulationModel.Type type); void setRunnerSupplier(ScenarioRunnerProvider runnerSupplier); }
ScenarioRunnerServiceImpl extends AbstractKieContainerService implements ScenarioRunnerService { @Override public List<TestResultMessage> runAllTests(final String identifier, final Path path) { final List<TestResultMessage> testResultMessages = new ArrayList<>(); for (Map.Entry<Path, ScenarioSimulationModel> entry : scenarioLoader.loadScenarios(path).entrySet()) { final Simulation simulation = entry.getValue().getSimulation(); final Settings settings = entry.getValue().getSettings(); if (!settings.isSkipFromBuild()) { testResultMessages.add(runTest(identifier, entry.getKey(), simulation.getScesimModelDescriptor(), simulation.getScenarioWithIndex(), settings, entry.getValue().getBackground()) .getTestResultMessage()); } } return testResultMessages; }  @Override List<TestResultMessage> runAllTests(final String identifier,
                                               final Path path); @Override SimulationRunResult runTest(final String identifier,
                                       final Path path,
                                       final ScesimModelDescriptor simulationDescriptor,
                                       final List<ScenarioWithIndex> scenarios,
                                       final Settings settings,
                                       final Background background); ScenarioRunnerProvider getOrCreateRunnerSupplier(ScenarioSimulationModel.Type type); void setRunnerSupplier(ScenarioRunnerProvider runnerSupplier);  }