public void NamespaceCriterion() { ITestMethod tm1 = new TestMethod(new TestFixture(typeof(SampleTestFixture)), typeof(SampleTestFixture).GetMethod("Foo")); ITestMethod tm2 = new TestMethod(new TestFixture(typeof(CriteriaTests)), typeof(CriteriaTests).GetMethod("NamespaceCriterion")); var selection = new TestRun(new NamespaceCriterion(tm1.DeclaringTypeFullName)); Assert.True(selection.Contains(tm1)); Assert.False(selection.Contains(tm2)); }
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 TwoNameCriteria() { ITestMethod tm = new TestMethod(new TestFixture(typeof(SampleTestFixture)), typeof(SampleTestFixture).GetMethod("Foo")); var addCriterion = new OrCriterion(); addCriterion.Add(new NameCriterion(typeof(SampleTestFixture).FullName + ".Foo")); addCriterion.Add(new NameCriterion("bar")); var testRun = new TestRun(addCriterion); Assert.True(testRun.Contains(tm)); }