public void Block_CreateAndGetFaceWithBadOrientation_ReturnNull() { // 1. Prepare SphericalVector faceOrientation = new SphericalVector(Math.PI, Math.PI); Block b = new TestBlock(new BlockFace("test", faceOrientation)); // 2. Execute BlockFace f = b.GetBlockFace(new SphericalVector(100, 100)); // 3. Verify Assert.Null(f); }
public void Block_CreateAndGetFace_ShouldFindFace() { // 1. Prepare SphericalVector faceOrientation = new SphericalVector(Math.PI, Math.PI); // 2. Execute Block b = new TestBlock(new BlockFace("test", faceOrientation)); BlockFace f = b.GetBlockFace(faceOrientation); // 3. Verify Assert.NotNull(f); }
public void Block_RotateAndGetFace_FindFace(string rotationAxisCc, double theta, string faceCc, string expectedCc) { // 1. Prepare Cartesian3dCoordinate axis = new Cartesian3dCoordinate(rotationAxisCc); Cartesian3dCoordinate faceOrientation = new Cartesian3dCoordinate(faceCc); Cartesian3dCoordinate expectedOrientation = new Cartesian3dCoordinate(expectedCc); Block b = new TestBlock(new BlockFace("test", faceOrientation)); // 2. Execute b.RotateAround(axis, theta); BlockFace f = b.GetBlockFace(expectedOrientation); // 3. Verify Assert.NotNull(f); }
public void Block_CreateRotateAndGetFaceWithOriginalOrientation_ReturnNull(string axisCc, string originalFace, double theta) { // 1. Prepare Cartesian3dCoordinate axis = new Cartesian3dCoordinate(axisCc); Cartesian3dCoordinate faceOrientation = new Cartesian3dCoordinate(originalFace); Block b = new TestBlock(new BlockFace("test", faceOrientation)); b.RotateAround(axis, theta); // 2. Execute BlockFace f = b.GetBlockFace(faceOrientation); // 3. Verify Assert.Null(f); }