@Test(expected = IllegalArgumentException.class) public void testCannotUpdateCPs2() { when(viewConnector.getControlPoints()).thenReturn(new ControlPoint[]{controlPoint1, controlPoint2}); tested = new UpdateControlPointPositionCommand(EDGE_UUID, newControlPoints); tested.check(graphCommandExecutionContext); }
@Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; }
UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } }
UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControlPointPositionCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                             final @MapsTo("controlPoints") ControlPoint[] controlPoints); }
UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControlPointPositionCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                             final @MapsTo("controlPoints") ControlPoint[] controlPoints); @Override CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context); @Override CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context); }
UpdateControlPointPositionCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkUpdateControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoints); return GraphCommandResultBuilder.SUCCESS; } UpdateControlPointPositionCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                             final @MapsTo("controlPoints") ControlPoint[] controlPoints); @Override CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context); @Override CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context);  }