@Test(expected = IllegalArgumentException.class) public void testCannotUpdateCPsDuringExecute() { newControlPoints = new ControlPoint[]{newControlPoint1, newControlPoint2}; tested = new UpdateCanvasControlPointPositionCommand(edge, newControlPoints); tested.execute(canvasHandler); }
@Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { allow(context); consumeControlPoints(context, edge, view -> view.updateControlPoints(controlPoints)); return buildResult(); }
UpdateCanvasControlPointPositionCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { allow(context); consumeControlPoints(context, edge, view -> view.updateControlPoints(controlPoints)); return buildResult(); } }
UpdateCanvasControlPointPositionCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { allow(context); consumeControlPoints(context, edge, view -> view.updateControlPoints(controlPoints)); return buildResult(); } UpdateCanvasControlPointPositionCommand(final Edge edge,
                                                   final ControlPoint[] controlPoints); }
UpdateCanvasControlPointPositionCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { allow(context); consumeControlPoints(context, edge, view -> view.updateControlPoints(controlPoints)); return buildResult(); } UpdateCanvasControlPointPositionCommand(final Edge edge,
                                                   final ControlPoint[] controlPoints); @Override CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context); @Override String toString(); }
UpdateCanvasControlPointPositionCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context) { allow(context); consumeControlPoints(context, edge, view -> view.updateControlPoints(controlPoints)); return buildResult(); } UpdateCanvasControlPointPositionCommand(final Edge edge,
                                                   final ControlPoint[] controlPoints); @Override CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> execute(final AbstractCanvasHandler context); @Override CommandResult<CanvasViolation> undo(final AbstractCanvasHandler context); @Override String toString();  }