@Test public void testCheck() { tested = new UpdateCanvasControlPointPositionCommand(edge, newControlPoints); CommandResult<CanvasViolation> result = tested.allow(canvasHandler); assertFalse(CommandUtils.isError(result)); }
@Override public CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context) { ControlPointValidations.checkUpdateControlPoint(getControlPoints(edge), controlPoints); return CanvasCommandResultBuilder.SUCCESS; }
UpdateCanvasControlPointPositionCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context) { ControlPointValidations.checkUpdateControlPoint(getControlPoints(edge), controlPoints); return CanvasCommandResultBuilder.SUCCESS; } }
UpdateCanvasControlPointPositionCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context) { ControlPointValidations.checkUpdateControlPoint(getControlPoints(edge), controlPoints); return CanvasCommandResultBuilder.SUCCESS; } UpdateCanvasControlPointPositionCommand(final Edge edge,
                                                   final ControlPoint[] controlPoints); }
UpdateCanvasControlPointPositionCommand extends AbstractCanvasCommand { @Override public CommandResult<CanvasViolation> allow(final AbstractCanvasHandler context) { ControlPointValidations.checkUpdateControlPoint(getControlPoints(edge), controlPoints); return CanvasCommandResultBuilder.SUCCESS; } 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> allow(final AbstractCanvasHandler context) { ControlPointValidations.checkUpdateControlPoint(getControlPoints(edge), controlPoints); return CanvasCommandResultBuilder.SUCCESS; } 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();  }