@Test public void execute() { command.execute(scenarioSimulationContextLocal); try { verify(command, times(1)).internalExecute(eq(scenarioSimulationContextLocal)); } catch (Exception e) { fail(e.getMessage()); } }
@Override public CommandResult<ScenarioSimulationViolation> execute(ScenarioSimulationContext context) { context.setStatusSimulationIfEmpty(); try { internalExecute(context); return commonExecution(context); } catch (Exception e) { return new CommandResultImpl<>(CommandResult.Type.ERROR, Collections.singleton(new ScenarioSimulationViolation(e.getMessage()))); } }
AbstractScenarioSimulationCommand extends AbstractCommand<ScenarioSimulationContext, ScenarioSimulationViolation> { @Override public CommandResult<ScenarioSimulationViolation> execute(ScenarioSimulationContext context) { context.setStatusSimulationIfEmpty(); try { internalExecute(context); return commonExecution(context); } catch (Exception e) { return new CommandResultImpl<>(CommandResult.Type.ERROR, Collections.singleton(new ScenarioSimulationViolation(e.getMessage()))); } } }
AbstractScenarioSimulationCommand extends AbstractCommand<ScenarioSimulationContext, ScenarioSimulationViolation> { @Override public CommandResult<ScenarioSimulationViolation> execute(ScenarioSimulationContext context) { context.setStatusSimulationIfEmpty(); try { internalExecute(context); return commonExecution(context); } catch (Exception e) { return new CommandResultImpl<>(CommandResult.Type.ERROR, Collections.singleton(new ScenarioSimulationViolation(e.getMessage()))); } } protected  AbstractScenarioSimulationCommand(); }
AbstractScenarioSimulationCommand extends AbstractCommand<ScenarioSimulationContext, ScenarioSimulationViolation> { @Override public CommandResult<ScenarioSimulationViolation> execute(ScenarioSimulationContext context) { context.setStatusSimulationIfEmpty(); try { internalExecute(context); return commonExecution(context); } catch (Exception e) { return new CommandResultImpl<>(CommandResult.Type.ERROR, Collections.singleton(new ScenarioSimulationViolation(e.getMessage()))); } } protected  AbstractScenarioSimulationCommand(); long getId(); @Override CommandResult<ScenarioSimulationViolation> undo(ScenarioSimulationContext context); @Override CommandResult<ScenarioSimulationViolation> execute(ScenarioSimulationContext context); }
AbstractScenarioSimulationCommand extends AbstractCommand<ScenarioSimulationContext, ScenarioSimulationViolation> { @Override public CommandResult<ScenarioSimulationViolation> execute(ScenarioSimulationContext context) { context.setStatusSimulationIfEmpty(); try { internalExecute(context); return commonExecution(context); } catch (Exception e) { return new CommandResultImpl<>(CommandResult.Type.ERROR, Collections.singleton(new ScenarioSimulationViolation(e.getMessage()))); } } protected  AbstractScenarioSimulationCommand(); long getId(); @Override CommandResult<ScenarioSimulationViolation> undo(ScenarioSimulationContext context); @Override CommandResult<ScenarioSimulationViolation> execute(ScenarioSimulationContext context);  }