public void IsDirectDescendantTest() { //Arrange TECBid bid = ModelCreation.TestBid(rand); TECTypical typical = ModelCreation.TestTypical(bid.Catalogs, rand); TECSubScope newSS = ModelCreation.TestSubScope(bid.Catalogs, rand); //Act typical.AddInstance(); TECSystem sys = typical.Instances[0]; TECEquipment equip = sys.Equipment[0]; TECSubScope ss = equip.SubScope[0]; //Assert Assert.IsFalse(typical.IsDirectDescendant(newSS)); Assert.IsTrue(typical.IsDirectDescendant(sys)); Assert.IsTrue(typical.IsDirectDescendant(equip)); Assert.IsTrue(typical.IsDirectDescendant(ss)); }