public static void SetLimitByCoordinate(double xCoordinate, double yCoordinate, double xLimitExpected, double yLimitExpected) { CartesianCoordinate coordinate = new CartesianCoordinate(xCoordinate, yCoordinate); curveLimit.SetLimitByCoordinate(coordinate); CartesianCoordinate limitExpected = new CartesianCoordinate(xLimitExpected, yLimitExpected, Tolerance); Assert.AreEqual(limitExpected, curveLimit.Limit); }
public static void SetLimitByCoordinate_Throws_NotSupportedException_if_Curve_Not_In_Cartesian_Coordinates() { CartesianCoordinate coordinate = new CartesianCoordinate(1, 2); CurveLimit nonCartesianLimit = new CurveLimit(new NonCartesianCurve()); Assert.Throws <NotSupportedException>(() => nonCartesianLimit.SetLimitByCoordinate(coordinate)); }