public void IsChildOfTest()
        {
            Assert.IsTrue(fileB.IsChildOf(directoryA));
            Assert.IsTrue(directoryB.IsChildOf(directoryA));
            Assert.IsTrue(fileA.IsChildOf(root));
            Assert.IsTrue(directoryA.IsChildOf(root));
            Assert.IsTrue(fileB.IsChildOf(root));
            Assert.IsTrue(directoryB.IsChildOf(root));

            Assert.IsFalse(directoryA.IsChildOf(fileB));
            Assert.IsFalse(directoryA.IsChildOf(directoryB));
            Assert.IsFalse(root.IsChildOf(fileA));
            Assert.IsFalse(root.IsChildOf(directoryA));
            Assert.IsFalse(root.IsChildOf(fileB));
            Assert.IsFalse(root.IsChildOf(directoryB));
        }
示例#2
0
        public void IsChildOfTest()
        {
            Assert.True(_fileB.IsChildOf(DirectoryA));
            Assert.True(_directoryB.IsChildOf(DirectoryA));
            Assert.True(_fileA.IsChildOf(_root));
            Assert.True(DirectoryA.IsChildOf(_root));
            Assert.True(_fileB.IsChildOf(_root));
            Assert.True(_directoryB.IsChildOf(_root));

            Assert.False(DirectoryA.IsChildOf(_fileB));
            Assert.False(DirectoryA.IsChildOf(_directoryB));
            Assert.False(_root.IsChildOf(_fileA));
            Assert.False(_root.IsChildOf(DirectoryA));
            Assert.False(_root.IsChildOf(_fileB));
            Assert.False(_root.IsChildOf(_directoryB));
        }