public void AddingChildToGroup_ShouldWork() { var g = new Group(); var s = new TestShape(); g.AddShape(s); Assert.Equal(1, g.Count); Assert.Contains(s, g.Shapes); Assert.Equal(s.Parent, g); }
public void IntersectingGroupWithRay_ShouldTestChildrenIfBoxIsHit() { var child = new TestShape(); var group = new Group(); group.AddShape(child); var r = new Ray(new Point(0, 0, -5), new Vector(0, 0, 1)); var xs = group.Intersect(r); Assert.NotNull(child.SavedRay); }
public void Shape_ShouldHaveParentMember() { var s = new TestShape(); Assert.True(s.Parent == null); }