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

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(9));
        }
Ejemplo 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));
            }
Ejemplo n.º 3
0
        public void TheoryWithDatapointsIsRunnable()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, nameof(TheoryFixture.TheoryWithArgumentsAndDatapoints));

            TestAssert.IsRunnable(test);
            Assert.That(test.TestCaseCount, Is.EqualTo(9));
        }
Ejemplo 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));
            }
Ejemplo n.º 5
0
        public void DatapointAndAttributeDataMayBeCombined()
        {
            Test test = TestBuilder.MakeParameterizedMethodSuite(fixtureType, "TestWithBothDatapointAndAttributeData");

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

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

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

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