public void OneNameCriterion() { ITestMethod tm = new TestMethod(new TestFixture(typeof(SampleTestFixture)), typeof(SampleTestFixture).GetMethod("Foo")); var nameCriterion = new NameCriterion(typeof(SampleTestFixture).FullName + ".Foo"); var selection = new TestRun(nameCriterion); Assert.True(selection.Contains(tm)); }
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); }