Пример #1
0
        public void NullableBooleanArgumentsAreSuppliedAutomatically()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, nameof(TheoryFixture.TestWithNullableBooleanArguments));

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(9));
        }
Пример #2
0
            public void WithNullableEnumArgumentsHasValuesSuppliedAutomatically()
            {
                Test test = TestBuilder.MakeParameterizedMethodSuite(nestedType, nameof(TheoryFixture.NestedWhileSearchingInDeclaringType.WithNullableEnumAsArgument));

                TestAssert.IsRunnable(test);
                Assert.That(test.TestCaseCount, Is.EqualTo(17));
            }
Пример #3
0
        public void TheoryWithDatapointsIsRunnable()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, nameof(TheoryFixture.TheoryWithArgumentsAndDatapoints));

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(9));
        }
Пример #4
0
            public void WithDatapointAndAttributeDataIsRunnable()
            {
                Test test = TestBuilder.MakeParameterizedMethodSuite(nestedType, nameof(TheoryFixture.NestedWhileSearchingInDeclaringType.WithBothDatapointAndAttributeData));

                TestAssert.IsRunnable(test);
                Assert.That(test.TestCaseCount, Is.EqualTo(6));
            }
Пример #5
0
        public void DatapointAndAttributeDataMayBeCombined()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, "TestWithBothDatapointAndAttributeData");

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(6));
        }
Пример #6
0
        public void BooleanArgumentsAreSuppliedAutomatically()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, "TestWithBooleanArguments");

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(4));
        }
Пример #7
0
        public void EnumArgumentsAreSuppliedAutomatically()
        {
            Test test = TestBuilder.MakeTestCase(fixtureType, "TestWithEnumAsArgument");

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(3));
        }
Пример #8
0
        public void TheoryWithDatapointsIsRunnable()
        {
            Test test = TestBuilder.MakeTestCase(fixtureType, "TheoryWithArgumentsAndDatapoints");

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(9));
        }
Пример #9
0
        public void AllValuesMayBeSuppliedByAttributes()
        {
            // NOTE: This test was failing with a count of 8 because both
            // TheoryAttribute and CombinatorialAttribute were adding cases.
            // Solution is to make TheoryAttribute a CombiningAttribute so
            // that no extra attribute is added to the method.
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, nameof(TheoryFixture.TestWithAllDataSuppliedByAttributes));

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(4));
        }
Пример #10
0
        public void EnumArgumentsAreSuppliedAutomatically()
        {
            Test test = TestBuilder.MakeTestCase(fixtureType, "TestWithEnumAsArgument");

            TestAssert.IsRunnable(test);
#if CLR_2_0 || CLR_4_0
            Assert.That(test.TestCaseCount, Is.EqualTo(16));
#else
            Assert.That(test.TestCaseCount, Is.EqualTo(15)); // No GenericParameter member
#endif
            Assert.That(test.TestCaseCount, Is.EqualTo(TypeHelper.GetEnumValues(typeof(AttributeTargets)).Length));
        }
Пример #11
0
 public void CanRunStaticFixtureSetUp()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureSetUp), ResultState.Success);
 }
Пример #12
0
 public void CanRunProtectedFixtureSetUp()
 {
     TestAssert.IsRunnable(typeof(ProtectedFixtureSetUp), ResultState.Success);
 }
Пример #13
0
 public void CanRunProtectedFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(ProtectedFixtureTearDown));
 }
Пример #14
0
 public void CanRunProtectedFixtureSetUp()
 {
     TestAssert.IsRunnable(typeof(ProtectedFixtureSetUp));
 }
Пример #15
0
 public void CanRunTestFixtureWithNoTests()
 {
     TestAssert.IsRunnable(typeof(FixtureWithNoTests));
 }
Пример #16
0
 public void CanRunMultipleOneTimeSetUp()
 {
     TestAssert.IsRunnable(typeof(MultipleFixtureSetUpAttributes));
 }
Пример #17
0
 public void CanRunConstructorWithArgsSupplied()
 {
     TestAssert.IsRunnable(typeof(FixtureWithArgsSupplied));
 }
Пример #18
0
 public void CanRunProtectedFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(ProtectedFixtureTearDown), ResultState.Success);
 }
Пример #19
0
 public void CanRunStaticFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureTearDown), ResultState.Success);
 }
Пример #20
0
 public void CanRunConstructorWithArgsSupplied()
 {
     TestAssert.IsRunnable(typeof(FixtureWithArgsSupplied), ResultState.Success);
 }
Пример #21
0
 public void CanRunFixtureDerivedFromAbstractDerivedTestFixture()
 {
     TestAssert.IsRunnable(typeof(DerivedFromAbstractDerivedTestFixture));
 }
Пример #22
0
 public void CanRunMultipleSetUp()
 {
     TestAssert.IsRunnable(typeof(MultipleSetUpAttributes), ResultState.Success);
 }
Пример #23
0
 public void CanRunMultipleOneTimeTearDown()
 {
     TestAssert.IsRunnable(typeof(MultipleFixtureTearDownAttributes));
 }
Пример #24
0
 public void CanRunFixtureDerivedFromAbstractDerivedTestFixture()
 {
     TestAssert.IsRunnable(typeof(DerivedFromAbstractDerivedTestFixture), ResultState.Success);
 }
Пример #25
0
 public void CanRunStaticFixture()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureWithoutTestFixtureAttribute));
 }
Пример #26
0
 public void CanRunMultipleTestFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(MultipleFixtureTearDownAttributes), ResultState.Success);
 }
Пример #27
0
 public void CanRunStaticFixtureSetUp()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureSetUp));
 }
Пример #28
0
 public void CanRunTestFixtureWithNoTests()
 {
     TestAssert.IsRunnable(typeof(FixtureWithNoTests), ResultState.Success);
 }
Пример #29
0
 public void CanRunStaticFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureTearDown));
 }
Пример #30
0
 public void CanRunStaticFixture()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureWithoutTestFixtureAttribute), ResultState.Success);
 }