Example #1
0
        public void GetAncestors()
        {
            DummySceneNode nodeA = new DummySceneNode();
              DummySceneNode nodeB = new DummySceneNode();
              DummySceneNode nodeC = new DummySceneNode();
              DummySceneNode nodeD = new DummySceneNode();
              nodeA.Children.Add(nodeB);
              nodeA.Children.Add(nodeC);
              nodeB.Children.Add(nodeD);

              var ancestors = nodeD.GetAncestors().ToArray();
              Assert.AreEqual(2, ancestors.Length);
              Assert.AreSame(nodeB, ancestors[0]);
              Assert.AreSame(nodeA, ancestors[1]);
        }
Example #2
0
        public void GetAncestors()
        {
            DummySceneNode nodeA = new DummySceneNode();
            DummySceneNode nodeB = new DummySceneNode();
            DummySceneNode nodeC = new DummySceneNode();
            DummySceneNode nodeD = new DummySceneNode();

            nodeA.Children.Add(nodeB);
            nodeA.Children.Add(nodeC);
            nodeB.Children.Add(nodeD);

            var ancestors = nodeD.GetAncestors().ToArray();

            Assert.AreEqual(2, ancestors.Length);
            Assert.AreSame(nodeB, ancestors[0]);
            Assert.AreSame(nodeA, ancestors[1]);
        }
Example #3
0
 public void GetAncestorsOfRoot()
 {
     DummySceneNode nodeA = new DummySceneNode();
       Assert.AreEqual(0, nodeA.GetAncestors().Count());
 }
Example #4
0
        public void GetAncestorsOfRoot()
        {
            DummySceneNode nodeA = new DummySceneNode();

            Assert.AreEqual(0, nodeA.GetAncestors().Count());
        }