@Test(expected = IllegalArgumentException.class) public void testInvalidCP() { tested = new AddControlPointCommand(EDGE_UUID, newControlPoint, 2); newControlPoint.setLocation(null); tested.check(graphCommandExecutionContext); }
@Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; }
AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } }
AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                  final @MapsTo("controlPoint") ControlPoint controlPoint,
                                  final @MapsTo("index") int index); }
AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                  final @MapsTo("controlPoint") ControlPoint controlPoint,
                                  final @MapsTo("index") int index); @Override CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context); @Override CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context); }
AddControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkAddControlPoint(getEdgeControlPoints(context).getControlPoints(), controlPoint, index); return GraphCommandResultBuilder.SUCCESS; } AddControlPointCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                  final @MapsTo("controlPoint") ControlPoint controlPoint,
                                  final @MapsTo("index") int index); @Override CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context); @Override CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context);  }