Esempio n. 1
0
        public void CanBeConstructed_IsNotNull()
        {
            var options = new TreeRunnerOptions
            {
                Path = "."
            };
            var runner = new RecursiveTreeRunner(options, 0);

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