@Test public void initialize_EnvelopeAvailable() { scenarioSimulationKogitoStateControlManagerSpy.initialize(scenarioCommandRegistryManagerMock, scenarioSimulationContextMock); verify(stateControlSpy, times(1)).setUndoCommand(stateControlUndoCommandCaptor.capture()); verify(stateControlSpy, times(1)).setRedoCommand(stateControlRedoCommandCaptor.capture()); stateControlUndoCommandCaptor.getValue().execute(); verify(scenarioCommandRegistryManagerMock, times(1)).undo(eq(scenarioSimulationContextMock)); stateControlRedoCommandCaptor.getValue().execute(); verify(scenarioCommandRegistryManagerMock, times(1)).redo(eq(scenarioSimulationContextMock)); }
public void initialize(final ScenarioCommandRegistryManager scenarioCommandRegistryManager, final ScenarioSimulationContext scenarioSimulationContext) { if (isEnvelopeAvailable()) { stateControlSupplier.get().setUndoCommand(() -> scenarioCommandRegistryManager.undo(scenarioSimulationContext)); stateControlSupplier.get().setRedoCommand(() -> scenarioCommandRegistryManager.redo(scenarioSimulationContext)); } }
ScenarioSimulationKogitoStateControlManager { public void initialize(final ScenarioCommandRegistryManager scenarioCommandRegistryManager, final ScenarioSimulationContext scenarioSimulationContext) { if (isEnvelopeAvailable()) { stateControlSupplier.get().setUndoCommand(() -> scenarioCommandRegistryManager.undo(scenarioSimulationContext)); stateControlSupplier.get().setRedoCommand(() -> scenarioCommandRegistryManager.redo(scenarioSimulationContext)); } } }
ScenarioSimulationKogitoStateControlManager { public void initialize(final ScenarioCommandRegistryManager scenarioCommandRegistryManager, final ScenarioSimulationContext scenarioSimulationContext) { if (isEnvelopeAvailable()) { stateControlSupplier.get().setUndoCommand(() -> scenarioCommandRegistryManager.undo(scenarioSimulationContext)); stateControlSupplier.get().setRedoCommand(() -> scenarioCommandRegistryManager.redo(scenarioSimulationContext)); } } @Inject  ScenarioSimulationKogitoStateControlManager(); }
ScenarioSimulationKogitoStateControlManager { public void initialize(final ScenarioCommandRegistryManager scenarioCommandRegistryManager, final ScenarioSimulationContext scenarioSimulationContext) { if (isEnvelopeAvailable()) { stateControlSupplier.get().setUndoCommand(() -> scenarioCommandRegistryManager.undo(scenarioSimulationContext)); stateControlSupplier.get().setRedoCommand(() -> scenarioCommandRegistryManager.redo(scenarioSimulationContext)); } } @Inject  ScenarioSimulationKogitoStateControlManager(); void initialize(final ScenarioCommandRegistryManager scenarioCommandRegistryManager,
                           final ScenarioSimulationContext scenarioSimulationContext); }
ScenarioSimulationKogitoStateControlManager { public void initialize(final ScenarioCommandRegistryManager scenarioCommandRegistryManager, final ScenarioSimulationContext scenarioSimulationContext) { if (isEnvelopeAvailable()) { stateControlSupplier.get().setUndoCommand(() -> scenarioCommandRegistryManager.undo(scenarioSimulationContext)); stateControlSupplier.get().setRedoCommand(() -> scenarioCommandRegistryManager.redo(scenarioSimulationContext)); } } @Inject  ScenarioSimulationKogitoStateControlManager(); void initialize(final ScenarioCommandRegistryManager scenarioCommandRegistryManager,
                           final ScenarioSimulationContext scenarioSimulationContext);  }