Пример #1
0
        public void TET_Struc_Relation_TreeChildren_Remove()
        {
            var child = new Folder();
            var root = new Folder
            {
                Id = 1,
                TreeChildren =
                {
                    child
                }
            };
            root.MarkSaved();

            Assert.IsTrue(child.TreePId.Equals(1));

            root.TreeChildren.Remove(child);

            Assert.IsTrue(child.IsDeleted);
            Assert.IsTrue(child.TreePId == 1);
            Assert.IsTrue(child.TreeParent == root);
        }