public virtual void GetNextPolyNodeNotEmptyTest() { PolyNode node = new PolyNode(); node.AddChild(new PolyNode()); node.AddChild(new PolyNode()); NUnit.Framework.Assert.AreSame(node.Childs[0], node.GetNext()); }
public virtual void GetNextPolyNodeWithSiblingTest() { PolyNode node = new PolyNode(); PolyNode child1 = new PolyNode(); PolyNode child2 = new PolyNode(); node.AddChild(child1); node.AddChild(child2); NUnit.Framework.Assert.AreSame(child2, child1.GetNext()); }
public virtual void GetChildCountTest() { PolyNode node = new PolyNode(); node.AddChild(new PolyNode()); NUnit.Framework.Assert.AreEqual(1, node.ChildCount); }
public virtual void IsNotHoleTest() { PolyNode parent = new PolyNode(); PolyNode child = new PolyNode(); parent.AddChild(child); NUnit.Framework.Assert.IsFalse(child.IsHole); }
public virtual void SetAndGetParentTest() { PolyNode parentNode = new PolyNode(); PolyNode child = new PolyNode(); parentNode.AddChild(child); NUnit.Framework.Assert.AreSame(parentNode, child.Parent); }
public virtual void AddAndGetChildTest() { PolyNode node = new PolyNode(); PolyNode child = new PolyNode(); node.AddChild(child); NUnit.Framework.Assert.AreSame(child, node.Childs[0]); NUnit.Framework.Assert.AreEqual(1, node.Childs.Count); }