private void CircularVectorComparer_Compare3dVector_BeExpected(string xCoord, string yCoord, string plane, int expected) { // 1. Prepare Cartesian3dCoordinate x = new Cartesian3dCoordinate(xCoord); Cartesian3dCoordinate y = new Cartesian3dCoordinate(yCoord); Plane p = new Plane(plane); var comparer = new CircularVectorComparer(p); // 2. Execute int result = comparer.Compare(x, y); int reverse = comparer.Compare(y, x); // 3. Verify Assert.Equal(expected, result); Assert.Equal(-expected, reverse); }
public void CircularVectorComparer_Compare2dVector_BeExpected(string xCoord, string yCoord, int expected) { // 1. Prepare Cartesian2dCoordinate x = new Cartesian2dCoordinate(xCoord); Cartesian2dCoordinate y = new Cartesian2dCoordinate(yCoord); // Plane has no impact in 2d, no need to change it. Plane p = new Plane("(1.0 0.0 0.0 1)"); var comparer = new CircularVectorComparer(p); // 2. Execute int result = comparer.Compare(x, y); int reverse = comparer.Compare(y, x); // 3. Verify Assert.Equal(expected, result); Assert.Equal(-expected, reverse); }