@Test public void testChecks() { tested = new DeleteControlPointCommand(EDGE_UUID, 0); CommandResult<RuleViolation> result = tested.check(graphCommandExecutionContext); assertFalse(CommandUtils.isError(result)); tested = new DeleteControlPointCommand(EDGE_UUID, 1); result = tested.check(graphCommandExecutionContext); assertFalse(CommandUtils.isError(result)); tested = new DeleteControlPointCommand(EDGE_UUID, 2); result = tested.check(graphCommandExecutionContext); assertFalse(CommandUtils.isError(result)); }
@Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; }
DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } }
DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                     final @MapsTo("index") int index); }
DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                     final @MapsTo("index") int index); @Override CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context); @Override CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context); }
DeleteControlPointCommand extends AbstractControlPointCommand { @Override protected CommandResult<RuleViolation> check(final GraphCommandExecutionContext context) { checkDeleteControlPoint(getEdgeControlPoints(context).getControlPoints(), index); return GraphCommandResultBuilder.SUCCESS; } DeleteControlPointCommand(final @MapsTo("edgeUUID") String edgeUUID,
                                     final @MapsTo("index") int index); @Override CommandResult<RuleViolation> execute(final GraphCommandExecutionContext context); @Override CommandResult<RuleViolation> undo(final GraphCommandExecutionContext context);  }