@Test public void createBackground() throws Exception { Background backgroundRetrieved = scenarioSimulationBuilder.createBackground(contextMock, ScenarioSimulationModel.Type.RULE, VALUE); assertNotNull(backgroundRetrieved); assertEquals(ruleBackgroundMock, backgroundRetrieved); backgroundRetrieved = scenarioSimulationBuilder.createBackground(contextMock, ScenarioSimulationModel.Type.DMN, VALUE); assertNotNull(backgroundRetrieved); assertEquals(dmnBackgroundMock, backgroundRetrieved); }
public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: throw new IllegalStateException("Unknown ScenarioSimulationModel.Type " + type); } }
ScenarioSimulationBuilder { public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: throw new IllegalStateException("Unknown ScenarioSimulationModel.Type " + type); } } }
ScenarioSimulationBuilder { public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: throw new IllegalStateException("Unknown ScenarioSimulationModel.Type " + type); } }  }
ScenarioSimulationBuilder { public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: throw new IllegalStateException("Unknown ScenarioSimulationModel.Type " + type); } }  Simulation createSimulation(Path context, ScenarioSimulationModel.Type type, String value); Background createBackground(Path context, ScenarioSimulationModel.Type type, String value); Settings createSettings(Path context, ScenarioSimulationModel.Type type, String value); }
ScenarioSimulationBuilder { public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: throw new IllegalStateException("Unknown ScenarioSimulationModel.Type " + type); } }  Simulation createSimulation(Path context, ScenarioSimulationModel.Type type, String value); Background createBackground(Path context, ScenarioSimulationModel.Type type, String value); Settings createSettings(Path context, ScenarioSimulationModel.Type type, String value);  }