public void CanBeConstructed_IsNotNull() { var options = new TreeRunnerOptions { Path = "." }; var runner = new RecursiveTreeRunner(options, 0); runner.ShouldNotBeNull(); runner.ShouldBeOfType <RecursiveTreeRunner>(); }
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); }
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); }