Example #1
0
        public void CountAllTestCasesWhenMatchingFilter()
        {
            Type fixtureType           = typeof(GenericFixtureWithThreeAttributes <>);
            GenericTestFixture fixture = new GenericTestFixture(fixtureType);

            Assert.That(fixture.CountTestCases(new SimpleNameFilter(fixtureType.FullName)), Is.EqualTo(6));
        }
Example #2
0
        public void CountAllTestCasesWhenUsingEmptyFilter()
        {
            GenericTestFixture fixture = new GenericTestFixture(
                typeof(GenericFixtureWithThreeAttributes <>));

            Assert.That(fixture.CountTestCases(TestFilter.Empty), Is.EqualTo(6));
        }
Example #3
0
        public void CountZeroTestCasesWhenNoTestsPresent()
        {
            GenericTestFixture fixture = new GenericTestFixture(
                typeof(EmptyGenericFixture <>));

            Assert.That(fixture.CountTestCases(TestFilter.Empty), Is.EqualTo(0));
        }
Example #4
0
        public void IsTestSuite()
        {
            GenericTestFixture fixture = new GenericTestFixture(
                typeof(GenericFixtureWithOneAttribute <>));

            Assert.That(fixture.IsSuite);
        }
Example #5
0
        public void NameIsTestClassName()
        {
            GenericTestFixture fixture = new GenericTestFixture(
                typeof(GenericFixtureWithOneAttribute <>));

            Assert.That(fixture.TestName.Name, Is.EqualTo("GenericFixtureWithOneAttribute`1"));
        }
Example #6
0
        public void CreateFromType()
        {
            GenericTestFixture fixture = new GenericTestFixture(
                typeof(GenericFixtureWithOneAttribute <>));

            Assert.That(fixture, Is.Not.Null);
        }
Example #7
0
        public void CountMatchingTestCasesWhenUsingNonEmptyFilter()
        {
            GenericTestFixture fixture = new GenericTestFixture(
                typeof(GenericFixtureWithThreeAttributes <>));
            Test test2 = (Test)fixture.Tests[1];

            Assert.That(fixture.CountTestCases(new NameFilter(test2.TestName)), Is.EqualTo(2));
        }