Esempio n. 1
0
 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));
 }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 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));
 }
Esempio n. 4
0
 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));
 }
Esempio n. 5
0
        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));
        }
Esempio n. 6
0
        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));
        }