Example #1
0
        public void AddDirectory_WhichAlreadyExists()
        {
            VFSDirectory parent = new VFSDirectory();
            VFSDirectory child1 = new VFSDirectory()
            {
                Name = "child"
            };
            VFSDirectory child2 = new VFSDirectory()
            {
                Name = "child"
            };

            parent.AddDirectory(child1);
            parent.AddDirectory(child2);
        }
Example #2
0
        public void AddedChild_HasParentAndRootAsParent()
        {
            VFSDirectory parent = new VFSDirectory();
            VFSDirectory child  = new VFSDirectory();

            parent.AddDirectory(child);

            Assert.ReferenceEquals(parent.Root, child.Root);
            Assert.ReferenceEquals(parent, child.Parent);
        }