public void TestLevelDown() { var parent = new Org(Guid.NewGuid()) { Name = "parentName" }; var child1 = new Org(Guid.NewGuid()) { Name = "child1" }; var child2 = new Org(Guid.NewGuid()) { Name = "child2" }; var child3 = new Org(Guid.NewGuid()) { Name = "child2" }; parent.Add(child1); parent.Add(child2); parent.Add(child3); Assert.IsTrue(child2.LevelDown(child3)); Assert.AreEqual(child3, child2.Parent); }
public void TestLevelDownItsChildFaile() { var parent = new Org(Guid.NewGuid()) { Name = "parentName" }; var child1 = new Org(Guid.NewGuid()) { Name = "child1" }; parent.Add(child1); Assert.IsTrue(parent.LevelDown(child1)); }
public void TestLevelDown() { var parent = new Org(Guid.NewGuid()) {Name = "parentName"}; var child1 = new Org(Guid.NewGuid()) {Name = "child1"}; var child2 = new Org(Guid.NewGuid()) {Name = "child2"}; var child3 = new Org(Guid.NewGuid()) {Name = "child2"}; parent.Add(child1); parent.Add(child2); parent.Add(child3); Assert.IsTrue(child2.LevelDown(child3)); Assert.AreEqual(child3, child2.Parent); }
public void TestLevelDownItsChildFaile() { var parent = new Org(Guid.NewGuid()) {Name = "parentName"}; var child1 = new Org(Guid.NewGuid()) {Name = "child1"}; parent.Add(child1); Assert.IsTrue(parent.LevelDown(child1)); }