public void ParametricLine_IsParallelToPlane_BeExpected(string planeCoordinates, string ccCoordinate1, string ccCoordinate2, bool result) { // 1. Prepare Plane p = new Plane(planeCoordinates); Cartesian3dCoordinate p1 = new Cartesian3dCoordinate(ccCoordinate1); Cartesian3dCoordinate p2 = new Cartesian3dCoordinate(ccCoordinate2); ParametricLine line = ParametricLine.FromTwoPoints(p1, p2); // 2. Execute bool b = line.IsParallelTo(p); // 3. Verify Assert.Equal(result, b); }
public void ParametricLine_CreateFromTwoPoints_BeExpected(Cartesian3dCoordinate p1, Cartesian3dCoordinate p2, double x, double xt, double y, double yt, double z, double zt) { // 1. Prepare // Nothing to prepare. // 2. Execute ParametricLine o = ParametricLine.FromTwoPoints(p1, p2); // 3. Verify Assert.Equal(x, o.X, PRECISION_DOUBLE); Assert.Equal(xt, o.A, PRECISION_DOUBLE); Assert.Equal(y, o.Y, PRECISION_DOUBLE); Assert.Equal(yt, o.B, PRECISION_DOUBLE); Assert.Equal(z, o.Z, PRECISION_DOUBLE); Assert.Equal(zt, o.C, PRECISION_DOUBLE); }