@Test public void initialize_EnvelopeNotAvailable() { envelopeAvailableBoolean = false; scenarioSimulationKogitoStateControlManagerSpy.initialize(scenarioCommandRegistryManagerMock, scenarioSimulationContextMock); verify(stateControlSpy, never()).setUndoCommand(any()); verify(stateControlSpy, never()).setRedoCommand(any()); }
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);  }