public void Run(IList<string> commandLineArguments) { var memory = new TypeDictionary(); var reporter = new CollectingReporter(); var runner = new SuiteRunnerShell(memory, reporter, NewService); runner.SuiteRunner.StartTest += OnStartTest; runner.SuiteRunner.EndTest += OnEndTest; runner.Run(commandLineArguments, memory); }
[Test] public void DryRunSuppressesSummaryReport() { memory.GetItem<Settings>().DryRun = true; var reporter = new CollectingReporter(); var runner = new FolderRunner(); runner.Run(new string[] {}, memory, reporter); Assert.AreEqual(string.Empty, reporter.Output); }
[Test] public void DryRunListsAllApplicableTestFiles() { memory.GetItem<Settings>().DryRun = true; AddTestFile(@"in\test1.html"); AddTestFile(@"in\test2.html"); var reporter = new CollectingReporter(); RunSuite(reporter); string expected = @"in\test1.html" + Environment.NewLine + @"in\test2.html" + Environment.NewLine; Assert.AreEqual(expected, reporter.Output); }
[Test] public void SetupAndTearDownAreNotIncludedInDryRun() { memory.GetItem<Settings>().DryRun = true; AddTestFile(@"in\setup.html"); AddTestFile(@"in\test.html"); AddTestFile(@"in\teardown.html"); var reporter = new CollectingReporter(); RunSuite(reporter); string expected = @"in\test.html" + Environment.NewLine; Assert.AreEqual(expected, reporter.Output); }
public FolderRunnerStory() { reporter = new CollectingReporter(); shell = new Shell(reporter, new FileSystemModel()); }