public void GetDescendentFilesOnNull()
        {
            // Setup
            TestDirectory source = null;

            // Execute
            var result = source.GetDescendentFiles();
        }
        public void GetDescendentFiles()
        {
            // Setup
            var source = new TestDirectory(_fileSystem, @"\Root\Directory");

            // Execute
            var result = source.GetDescendentFiles();

            // Assert
            Assert.AreEqual(6, result.Length);
            CollectionAssert.AreEquivalent(new[] { "File1.dat", "File1.dat", "File1.dat", "File2.dat", "File2.dat", "File2.dat", }, result.Select(i => i.Name).ToArray());
        }
        public void GetDescendentFilesWhereNoneExist()
        {
            // Setup
            _fileSystem.StageDirectory(@"\Root\Directory\Sub1\Sub4");
            _fileSystem.StageDirectory(@"\Root\Directory\Sub1\Sub4\sub5");
            _fileSystem.StageDirectory(@"\Root\Directory\Sub1\Sub4\sub6");
            _fileSystem.StageDirectory(@"\Root\Directory\Sub1\Sub4\sub6\sub7");
            var source = new TestDirectory(_fileSystem, @"\Root\Directory\sub1\sub4");

            // Execute
            var result = source.GetDescendentFiles();

            // Assert
            Assert.AreEqual(0, result.Length);
        }
        public void GetDescendentFilesWhereNoneExist()
        {
            // Setup
            _fileSystem.StageDirectory(@"\Root\Directory\Sub1\Sub4");
            _fileSystem.StageDirectory(@"\Root\Directory\Sub1\Sub4\sub5");
            _fileSystem.StageDirectory(@"\Root\Directory\Sub1\Sub4\sub6");
            _fileSystem.StageDirectory(@"\Root\Directory\Sub1\Sub4\sub6\sub7");
            var source = new TestDirectory(_fileSystem, @"\Root\Directory\sub1\sub4");

            // Execute
            var result = source.GetDescendentFiles();

            // Assert
            Assert.AreEqual(0, result.Length);
        }
        public void GetDescendentFiles()
        {
            // Setup
            var source = new TestDirectory(_fileSystem, @"\Root\Directory");

            // Execute
            var result = source.GetDescendentFiles();

            // Assert
            Assert.AreEqual(6, result.Length);
            CollectionAssert.AreEquivalent(new[] { "File1.dat", "File1.dat", "File1.dat", "File2.dat", "File2.dat", "File2.dat", }, result.Select(i => i.Name).ToArray());
        }