public void Difference_MinusOperatorCreatesDifferenceObject() { var obj = new Cube() - new Sphere(); var diff = new Sphere().Difference(new Cube()); Assert.IsTrue(obj.GetType() == diff.GetType()); }
public void Union_ChainingAdditionAddsToTheSameUnion() { var obj = new Cube() + new Sphere() + new Text3D("WOW!") + new Cylinder().Translate(1, 2, 5); var union = new Sphere().Union(new Cube()); var unionChildrenCount = obj.Children().Where(child => child.GetType() == union.GetType()).Count(); Assert.AreEqual(0, unionChildrenCount); }
public void Difference_ChainingMinusOperationAddsToTheSameDifferenceObject() { var obj = new Cube() - new Sphere() - new Text3D("WOW!") - new Cylinder().Translate(1, 2, 5); var diff = new Sphere().Difference(new Cube()); var childrenThatAreDiffs = obj.Children().Where(child => child.GetType() == diff.GetType()).Count(); Assert.AreEqual(0, childrenThatAreDiffs); }