Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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));
        }