public void ValidateParentNodeCTypeBothDependantToUnit() { OOBNode n00 = new OOBNode("test0", "test0", ods, "UNITS"); OOBNode n01 = new OOBNode("test1", "test1", ods, "UNITS"); OOBNode n02 = new OOBNode("test2", "test2", ods, "UNITS"); OOBNode n10 = new OOBNode("test3", "test3", ods, "UNITS"); OOBNode n11 = new OOBNode("test4", "test4", ods, "EQUIPMENT"); n00.addChild(n01); n01.addChild(n02); n10.addChild(n11); n01.addChild(n10); Assert.IsTrue(n00.CType.Equals("BOTH")); }
public void ValidateNodeCTypeUnits() { OOBNode n0 = new OOBNode("test0", "test0", ods, "UNITS"); OOBNode n1 = new OOBNode("test1", "test1", ods, "UNITS"); n0.addChild(n1); Assert.IsTrue(n0.CType.Equals("UNITS")); }
public void IsRootTestFalse() { OOBNode n0 = new OOBNode("test0", "test0", ods, "test0"); OOBNode n1 = new OOBNode("test1", "test1", ods, "test1"); n0.addChild(n1); Assert.IsFalse(n1.IsRoot); }
public void ValidateNodeCTypeDependants() { OOBNode n0 = new OOBNode("test0", "test0", ods, "UNITS"); OOBNode n1 = new OOBNode("test1", "test1", ods, "EQUIPMENT"); n0.addChild(n1); Assert.IsTrue(n0.CType.Equals("DEPENDANTS")); }
public void ValidateParentName() { OOBNode n0 = new OOBNode("test0", "test0", ods, "test0"); OOBNode n1 = new OOBNode("test1", "test1", ods, "test1"); n0.addChild(n1); Assert.AreEqual(n1.ParentName, n0.Name); }
public void AddChildIncreaseNumChildren() { OOBNode n00 = new OOBNode("test0", "test0", ods, "UNITS"); OOBNode n01 = new OOBNode("test1", "test1", ods, "UNITS"); int numChildren = n00.Children.Count; n00.addChild(n01); Assert.IsTrue(numChildren < n00.Children.Count); }
public void ValidateNodeCTypeBoth() { OOBNode n0 = new OOBNode("test0", "test0", ods, "UNITS"); OOBNode n1 = new OOBNode("test1", "test1", ods, "UNITS"); OOBNode n2 = new OOBNode("test2", "test2", ods, "EQUIPMENT"); n0.addChild(n1); n1.addChild(n2); Assert.IsTrue(n0.CType.Equals("BOTH")); }
public void ValidateAllParentNodeCTypeBoth() { OOBNode n0 = new OOBNode("test0", "test0", ods, "UNITS"); OOBNode n1 = new OOBNode("test1", "test1", ods, "UNITS"); OOBNode n2 = new OOBNode("test1", "test1", ods, "UNITS"); OOBNode n3 = new OOBNode("test3", "test3", ods, "EQUIPMENT"); n0.addChild(n1); n1.addChild(n2); n2.addChild(n3); Assert.IsTrue(n3.Parent.Parent.CType.Equals("BOTH") && n3.Parent.Parent.Parent.CType.Equals("BOTH")); }
public void GetDescendantDoesNotExist() { OOBNode n00 = new OOBNode("test0", "test0", ods, "UNITS"); OOBNode n01 = new OOBNode("test1", "test1", ods, "UNITS"); OOBNode n02 = new OOBNode("test2", "test2", ods, "UNITS"); n00.addChild(n01); n01.addChild(n02); OOBNode n = n00.GetDescendant("test3"); n00.removeChild("test1"); Assert.AreNotEqual(n02, n); }
public void ValidateParentNodeCTypeBothUnitToDependant() { OOBNode n00 = new OOBNode("test0", "test0", ods, "UNITS"); OOBNode n01 = new OOBNode("test1", "test1", ods, "UNITS"); OOBNode n02 = new OOBNode("test2", "test2", ods, "UNITS"); OOBNode n10 = new OOBNode("test3", "test3", ods, "UNITS"); OOBNode n11 = new OOBNode("test4", "test4", ods, "EQUIPMENT"); n00.addChild(n01); n01.addChild(n02); n10.addChild(n11); n10.addChild(n00); Assert.IsTrue(n10.CType.Equals("BOTH")); }