@Test(expected = IllegalArgumentException.class) public void testInvalidCheckDeleteControlPoint2() { checkDeleteControlPoint(controlPoints, 2); }
public static void checkDeleteControlPoint(final ControlPoint[] controlPoints, final int index) { if (isControlPointIndexInvalid.test(index)) { throw new IllegalArgumentException("The given index [" + index + "] for the new CP is not valid."); } if (isDeletingControlPointIndexForbidden.test(controlPoints, index)) { throw new IllegalArgumentException("Cannot delete a new CP at the given index [" + index + "]."); } }
ControlPointValidations { public static void checkDeleteControlPoint(final ControlPoint[] controlPoints, final int index) { if (isControlPointIndexInvalid.test(index)) { throw new IllegalArgumentException("The given index [" + index + "] for the new CP is not valid."); } if (isDeletingControlPointIndexForbidden.test(controlPoints, index)) { throw new IllegalArgumentException("Cannot delete a new CP at the given index [" + index + "]."); } } }
ControlPointValidations { public static void checkDeleteControlPoint(final ControlPoint[] controlPoints, final int index) { if (isControlPointIndexInvalid.test(index)) { throw new IllegalArgumentException("The given index [" + index + "] for the new CP is not valid."); } if (isDeletingControlPointIndexForbidden.test(controlPoints, index)) { throw new IllegalArgumentException("Cannot delete a new CP at the given index [" + index + "]."); } }  }
ControlPointValidations { public static void checkDeleteControlPoint(final ControlPoint[] controlPoints, final int index) { if (isControlPointIndexInvalid.test(index)) { throw new IllegalArgumentException("The given index [" + index + "] for the new CP is not valid."); } if (isDeletingControlPointIndexForbidden.test(controlPoints, index)) { throw new IllegalArgumentException("Cannot delete a new CP at the given index [" + index + "]."); } }  static void checkAddControlPoint(final ControlPoint[] controlPoints,
                                            final ControlPoint controlPoint,
                                            final int index); static void checkDeleteControlPoint(final ControlPoint[] controlPoints,
                                               final int index); static void checkUpdateControlPoint(final ControlPoint[] controlPoints1,
                                               final ControlPoint[] controlPoints2); }
ControlPointValidations { public static void checkDeleteControlPoint(final ControlPoint[] controlPoints, final int index) { if (isControlPointIndexInvalid.test(index)) { throw new IllegalArgumentException("The given index [" + index + "] for the new CP is not valid."); } if (isDeletingControlPointIndexForbidden.test(controlPoints, index)) { throw new IllegalArgumentException("Cannot delete a new CP at the given index [" + index + "]."); } }  static void checkAddControlPoint(final ControlPoint[] controlPoints,
                                            final ControlPoint controlPoint,
                                            final int index); static void checkDeleteControlPoint(final ControlPoint[] controlPoints,
                                               final int index); static void checkUpdateControlPoint(final ControlPoint[] controlPoints1,
                                               final ControlPoint[] controlPoints2); static Predicate<Integer> isControlPointIndexInvalid; static Predicate<ControlPoint> isControlPointInvalid; static BiPredicate<ControlPoint[], Integer> isAddingControlPointIndexForbidden; static BiPredicate<ControlPoint[], Integer> isDeletingControlPointIndexForbidden; static BiPredicate<ControlPoint[], ControlPoint[]> cannotControlPointsBeUpdated; }