public void RunTwoSelectedCategories() { var setupData = new RunnerSetupData { WorkingDirectory = workingDir, DryRun = true, Results = Path.GetTempFileName(), Continuous = false, IsTesting = true, }; var runner = new TestRunner(setupData); var assData = runner.Assemblies.First(); assData.ShouldRun = false; var catData1 = runner.Assemblies.SelectMany(a => a.Categories).First(c => c.Name == "Smoke"); ((IExcludable)catData1).ShouldRun = true; var catData2 = runner.Assemblies.SelectMany(a => a.Categories).First(c => c.Name == "Integration"); ((IExcludable)catData2).ShouldRun = true; runner.SetupTests(); Assert.AreEqual(runner.GetRunnableTests().Count(), 3); }
public void BadModelPathReturnsNullJournal() { var runner = new TestRunner(TestSetupData()); var testData = runner.Assemblies.SelectMany(a=>a.Fixtures).SelectMany(f => f.Tests).First(t => t.Name == "TestE"); runner.SetupTests(); Assert.IsNull(testData.JournalPath); }
public void RunByAssemblySetup() { var runner = new TestRunner(TestSetupData()); runner.SetupTests(); Assert.AreEqual(runner.GetRunnableTests().Count(), 5); }
public void BadModelPathReturnsNullJournal() { var runner = new TestRunner(TestSetupData()); var testData = runner.Assemblies.SelectMany(a => a.Fixtures).SelectMany(f => f.Tests).First(t => t.Name == "TestE"); runner.SetupTests(); Assert.IsNull(testData.JournalPath); }
public void RunByTestSetup() { var runner = new TestRunner(TestSetupData()); var assData = runner.Assemblies.First(); assData.ShouldRun = false; var testData = assData.Fixtures.First().Tests.First(); testData.ShouldRun = true; runner.SetupTests(); Assert.AreEqual(runner.GetRunnableTests().Count(), 1); }
public void DoesNotRunCategoryThatIsExcluded() { var setupData = new RunnerSetupData { WorkingDirectory = workingDir, DryRun = true, Results = Path.GetTempFileName(), Continuous = false, IsTesting = true, ExcludedCategory = "Failure" }; var runner = new TestRunner(setupData); runner.SetupTests(); Assert.AreEqual(runner.GetRunnableTests().Count(), 3); }
public void RunsFixtureIfSpecifiedInParameters() { var setupData = new RunnerSetupData { WorkingDirectory = workingDir, DryRun = true, Results = Path.GetTempFileName(), Continuous = false, IsTesting = true, Fixture = "FixtureA" }; var runner = new TestRunner(setupData); runner.SetupTests(); Assert.AreEqual(runner.GetRunnableTests().Count(), 3); }
public void RunsTestIfSpecifiedInParameters() { var setupData = new RunnerSetupData { WorkingDirectory = workingDir, DryRun = true, Results = Path.GetTempFileName(), Continuous = false, IsTesting = true, Test = "TestA" }; var runner = new TestRunner(setupData); runner.SetupTests(); Assert.AreEqual(runner.GetRunnableTests().Count(), 1); }