Esempio n. 1
0
        public void NullableBooleanArgumentsAreSuppliedAutomatically()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, nameof(TheoryFixture.TestWithNullableBooleanArguments));

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(9));
        }
Esempio n. 2
0
            public void WithNullableEnumArgumentsHasValuesSuppliedAutomatically()
            {
                Test test = TestBuilder.MakeParameterizedMethodSuite(nestedType, nameof(TheoryFixture.NestedWhileSearchingInDeclaringType.WithNullableEnumAsArgument));

                TestAssert.IsRunnable(test);
                Assert.That(test.TestCaseCount, Is.EqualTo(17));
            }
Esempio n. 3
0
        public void TheoryWithDatapointsIsRunnable()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, nameof(TheoryFixture.TheoryWithArgumentsAndDatapoints));

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(9));
        }
Esempio n. 4
0
            public void WithDatapointAndAttributeDataIsRunnable()
            {
                Test test = TestBuilder.MakeParameterizedMethodSuite(nestedType, nameof(TheoryFixture.NestedWhileSearchingInDeclaringType.WithBothDatapointAndAttributeData));

                TestAssert.IsRunnable(test);
                Assert.That(test.TestCaseCount, Is.EqualTo(6));
            }
Esempio n. 5
0
        public void DatapointAndAttributeDataMayBeCombined()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, "TestWithBothDatapointAndAttributeData");

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(6));
        }
Esempio n. 6
0
        public void BooleanArgumentsAreSuppliedAutomatically()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, "TestWithBooleanArguments");

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(4));
        }
Esempio n. 7
0
        public void EnumArgumentsAreSuppliedAutomatically()
        {
            Test test = TestBuilder.MakeTestCase(fixtureType, "TestWithEnumAsArgument");

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(3));
        }
Esempio n. 8
0
        public void TheoryWithDatapointsIsRunnable()
        {
            Test test = TestBuilder.MakeTestCase(fixtureType, "TheoryWithArgumentsAndDatapoints");

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(9));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 11
0
 public void CanRunStaticFixtureSetUp()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureSetUp), ResultState.Success);
 }
Esempio n. 12
0
 public void CanRunProtectedFixtureSetUp()
 {
     TestAssert.IsRunnable(typeof(ProtectedFixtureSetUp), ResultState.Success);
 }
Esempio n. 13
0
 public void CanRunProtectedFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(ProtectedFixtureTearDown));
 }
Esempio n. 14
0
 public void CanRunProtectedFixtureSetUp()
 {
     TestAssert.IsRunnable(typeof(ProtectedFixtureSetUp));
 }
Esempio n. 15
0
 public void CanRunTestFixtureWithNoTests()
 {
     TestAssert.IsRunnable(typeof(FixtureWithNoTests));
 }
Esempio n. 16
0
 public void CanRunMultipleOneTimeSetUp()
 {
     TestAssert.IsRunnable(typeof(MultipleFixtureSetUpAttributes));
 }
Esempio n. 17
0
 public void CanRunConstructorWithArgsSupplied()
 {
     TestAssert.IsRunnable(typeof(FixtureWithArgsSupplied));
 }
Esempio n. 18
0
 public void CanRunProtectedFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(ProtectedFixtureTearDown), ResultState.Success);
 }
Esempio n. 19
0
 public void CanRunStaticFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureTearDown), ResultState.Success);
 }
Esempio n. 20
0
 public void CanRunConstructorWithArgsSupplied()
 {
     TestAssert.IsRunnable(typeof(FixtureWithArgsSupplied), ResultState.Success);
 }
Esempio n. 21
0
 public void CanRunFixtureDerivedFromAbstractDerivedTestFixture()
 {
     TestAssert.IsRunnable(typeof(DerivedFromAbstractDerivedTestFixture));
 }
Esempio n. 22
0
 public void CanRunMultipleSetUp()
 {
     TestAssert.IsRunnable(typeof(MultipleSetUpAttributes), ResultState.Success);
 }
Esempio n. 23
0
 public void CanRunMultipleOneTimeTearDown()
 {
     TestAssert.IsRunnable(typeof(MultipleFixtureTearDownAttributes));
 }
Esempio n. 24
0
 public void CanRunFixtureDerivedFromAbstractDerivedTestFixture()
 {
     TestAssert.IsRunnable(typeof(DerivedFromAbstractDerivedTestFixture), ResultState.Success);
 }
Esempio n. 25
0
 public void CanRunStaticFixture()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureWithoutTestFixtureAttribute));
 }
Esempio n. 26
0
 public void CanRunMultipleTestFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(MultipleFixtureTearDownAttributes), ResultState.Success);
 }
Esempio n. 27
0
 public void CanRunStaticFixtureSetUp()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureSetUp));
 }
Esempio n. 28
0
 public void CanRunTestFixtureWithNoTests()
 {
     TestAssert.IsRunnable(typeof(FixtureWithNoTests), ResultState.Success);
 }
Esempio n. 29
0
 public void CanRunStaticFixtureTearDown()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureTearDown));
 }
Esempio n. 30
0
 public void CanRunStaticFixture()
 {
     TestAssert.IsRunnable(typeof(StaticFixtureWithoutTestFixtureAttribute), ResultState.Success);
 }