@Test public void testCanvasCommandUndo() { makeCommand(OLD_AGGREGATOR); final Command<AbstractCanvasHandler, CanvasViolation> c = command.newCanvasCommand(handler); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.execute(handler)); reset(canvasOperation); assertEquals(CanvasCommandResultBuilder.SUCCESS, c.undo(handler)); verifyZeroInteractions(handler, gce, ruleManager); verify(canvasOperation).execute(); }
@Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; }
SetBuiltinAggregatorCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                       VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } }
SetBuiltinAggregatorCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                       VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } SetBuiltinAggregatorCommand(final DecisionTable dtable,
                                       final BuiltinAggregator aggregator,
                                       final org.uberfire.mvp.Command canvasOperation); }
SetBuiltinAggregatorCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                       VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } SetBuiltinAggregatorCommand(final DecisionTable dtable,
                                       final BuiltinAggregator aggregator,
                                       final org.uberfire.mvp.Command canvasOperation);  }
SetBuiltinAggregatorCommand extends AbstractCanvasGraphCommand implements VetoExecutionCommand,
                                                                                       VetoUndoCommand { @Override protected Command<AbstractCanvasHandler, CanvasViolation> newCanvasCommand(final AbstractCanvasHandler handler) { return new AbstractCanvasCommand() { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } @Override public CommandResult<CanvasViolation> undo(final AbstractCanvasHandler handler) { canvasOperation.execute(); return CanvasCommandResultBuilder.SUCCESS; } }; } SetBuiltinAggregatorCommand(final DecisionTable dtable,
                                       final BuiltinAggregator aggregator,
                                       final org.uberfire.mvp.Command canvasOperation);   }