public void CriterionAppliedWithMultipleAssemblies() { var recipe = RecipeFactory.NewRecipe("twoassemblies.deleteme.recipe"); recipe.AddAssembly(_testDll); var testDll = Path.Combine(Util.SolutionCodeBase, "csUnit.CompatibilityTests\\NUnit-2.4.7\\bin\\Debug\\NUnit-2.4.7.dll"); recipe.AddAssembly(testDll); var listener = new SimpleRecipeListener(recipe); recipe.RunTests(new TestRun(new AllTestsCriterion())); recipe.Join(); Assert.Equals(7, listener.TestCount); Assert.Equals(5, listener.PassedCount); listener = new SimpleRecipeListener(recipe); var setCriterion = new MultipleTestsCriterion(); setCriterion.Add("TestDll", "TestDll.ClassWithTests", "AFailingTest"); setCriterion.Add("TestDll", "TestDll.ClassWithTests", "ATestWithError"); recipe.RunTests(new TestRun(setCriterion)); recipe.Join(); Assert.Equals(2, listener.TestCount); }
public void CriterionIsRemovedForSecondTestRun() { var recipe = RecipeFactory.NewRecipe(string.Empty); recipe.AddAssembly(_testDll); var criterion = new NameCriterion("TestDll.ClassWithTests.ASucceedingTest"); var listener = new SimpleRecipeListener(recipe); recipe.RunTests(new TestRun(criterion)); recipe.Join(); Assert.Equals(1, listener.TestCount); listener = new SimpleRecipeListener(recipe); recipe.RunTests(new TestRun(new AllTestsCriterion())); recipe.Join(); Assert.Equals(3, listener.TestCount); }
public void CriterionIsAppliedForSecondTestRun() { var recipe = RecipeFactory.NewRecipe(string.Empty); recipe.AddAssembly(_testDll); var listener = new SimpleRecipeListener(recipe); recipe.RunTests(new TestRun(new AllTestsCriterion())); recipe.Join(); Assert.Equals(3, listener.TestCount); var criterion = new NameCriterion("TestDll.ClassWithTests.ASucceedingTest"); listener = new SimpleRecipeListener(recipe); recipe.RunTests(new TestRun(criterion)); recipe.Join(); Assert.Equals(1, listener.TestCount); }