public void ExecutesSuiteTearDownLast() { var folders = new FolderTestModel(); folders.MakeFile("in\\suiteteardown.html", "<table><tr><td>fixture</td></tr></table>"); folders.MakeFile("in\\zzzz.html", "<table><tr><td>fixture</td></tr></table>"); var config = new Configuration(); config.GetItem<Settings>().InputFolder = "in"; config.GetItem<Settings>().OutputFolder = "out"; var runner = new SuiteRunner(config, new NullReporter()); runner.Run(new StoryTestFolder(config, folders), string.Empty); int tearDown = folders.FileContent("out\\reportIndex.html").IndexOf("suiteteardown.html"); int otherFile = folders.FileContent("out\\reportIndex.html").IndexOf("zzzz.html"); Assert.IsTrue(otherFile < tearDown); }
public void ApartmentStateFromSuiteConfigIsUsed() { var folders = new FolderTestModel(); folders.MakeFile("suite.config.xml", "<config><Settings><ApartmentState>STA</ApartmentState></Settings></config>"); RunShell(new[] {"-r", typeof(SampleRunner).FullName, "-c", "suite.config.xml"}, folders ); Assert.AreEqual(ApartmentState.STA, SampleRunner.ApartmentState); }
public void CustomAppConfigFromSuiteConfigIsUsed() { var folders = new FolderTestModel(); folders.MakeFile("suite.config.xml", "<config><Settings><AppConfigFile>fitSharpTest.dll.alt.config</AppConfigFile></Settings></config>"); int result = RunShell(new[] {"-c", "suite.config.xml", "-r", typeof (SampleRunner).FullName + "," + typeof (SampleRunner).Assembly.CodeBase}, folders ); Assert.AreEqual(606, result); }
public void RunnerFromSuiteConfigIsUsed() { var folders = new FolderTestModel(); folders.MakeFile("suite.config.xml", "<config><Settings><Runner>" + typeof (SampleRunner).FullName + "," + typeof (SampleRunner).Assembly.CodeBase + "</Runner></Settings></config>"); int result = RunShell(new[] {"-c", "suite.config.xml"}, folders ); Assert.AreEqual(SampleRunner.Result, result); }