コード例 #1
0
        public void CanBeConstructed_IsNotNull()
        {
            var options = new TreeRunnerOptions
            {
                Path = "."
            };
            var runner = new RecursiveTreeRunner(options, 0);

            runner.ShouldNotBeNull();
            runner.ShouldBeOfType <RecursiveTreeRunner>();
        }
コード例 #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);
        }
コード例 #3
0
 public RecursiveTreeRunner(TreeRunnerOptions options, int level)
 {
     _options = options;
     _level   = level;
 }
コード例 #4
0
 public TreeRunner(TreeRunnerOptions options)
 {
     _options = options;
 }