public void Translate_BoundsMoveWhenObjectIsTranslated() { var cube = new Cube(); var boundsBefore = cube.Bounds(); var boundsAfter = cube.Translate(5, 2, 3).Bounds(); Assert.AreEqual(boundsAfter.TopRight, boundsBefore.TopRight + new Vector3(5, 2, 3)); Assert.AreEqual(boundsAfter.BottomLeft, boundsBefore.BottomLeft + new Vector3(5, 2, 3)); }
public void OSCADObject_ChildrenForSimpleStructureYieldsAllChildren() { var cube = new Cube(); var translatedCube = cube.Translate(1, 2, 5); //Should contain both translation and Cube var coloredTranslatedCube = translatedCube.Color("Red"); List<OSCADObject> expectedChildren = new List<OSCADObject>() { cube, translatedCube }; var children = coloredTranslatedCube.Children(); Assert.IsTrue(children.Contains(cube)); Assert.IsTrue(children.Contains(translatedCube)); Assert.IsFalse(children.Contains(coloredTranslatedCube)); }