コード例 #1
0
        public void Run_NoOptionsSet_Runs()
        {
            string basePath = SetUpFolders();

            var recursiveRunner = new RecursiveTreeRunner(new TreeRunnerOptions {
                Path = basePath
            }, 0);
            var result = recursiveRunner.Run();

            result.ShouldNotBeNull();
            result.DirectoryCount.ShouldBe(3);
            result.FileCount.ShouldBe(8);
        }
コード例 #2
0
        public void Run_MaxDepths_Runs(int maxDepth, int expectedDirectoryCount, int expectedFileCount)
        {
            string basePath = SetUpFolders();

            var options = new TreeRunnerOptions
            {
                Path     = basePath,
                MaxDepth = maxDepth
            };
            var recursiveRunner = new RecursiveTreeRunner(options, 0);
            var result          = recursiveRunner.Run();

            result.ShouldNotBeNull();
            result.DirectoryCount.ShouldBe(expectedDirectoryCount);
            result.FileCount.ShouldBe(expectedFileCount);
        }