Ejemplo n.º 1
0
        public void GetRowAttributes_TwoRows()
        {
            MethodInfo method = GetTestClassMethod("RowTestMethodWith2Rows");

            Attribute[] rowAttributes = RowTestFramework.GetRowAttributes(method);

            Assert.That(rowAttributes.Length, Is.EqualTo(2));
        }
Ejemplo n.º 2
0
        public void IsRowTest_False()
        {
            MethodInfo method = GetTestClassMethod("MethodWithoutRowTestAttribute");

            bool isRowTest = RowTestFramework.IsRowTest(method);

            Assert.That(isRowTest, Is.False);
        }
Ejemplo n.º 3
0
        public void GetRowArguments()
        {
            object[]     rowArguments = new object[] { 4, 5 };
            RowAttribute row          = new RowAttribute(rowArguments);

            object[] extractedRowArguments = RowTestFramework.GetRowArguments(row);

            Assert.That(extractedRowArguments, Is.SameAs(rowArguments));
        }
Ejemplo n.º 4
0
        public void GetTestName()
        {
            string       testName = "UnitTest";
            RowAttribute row      = CreateRowAttribute();

            row.TestName = testName;

            string extractedTestName = RowTestFramework.GetTestName(row);

            Assert.That(extractedTestName, Is.EqualTo(testName));
        }
Ejemplo n.º 5
0
        public void GetExpectedExceptionType()
        {
            Type         expectedExceptionType = typeof(ArgumentException);
            RowAttribute row = CreateRowAttribute();

            row.ExpectedException = expectedExceptionType;

            Type extractedExpectedExceptionType = RowTestFramework.GetExpectedExceptionType(row);

            Assert.That(extractedExpectedExceptionType, Is.SameAs(expectedExceptionType));
        }
Ejemplo n.º 6
0
        public void GetExpectedExceptionMessage()
        {
            string       expectedExceptionMessage = "Expected Exception Message.";
            Type         expectedExceptionType    = typeof(ArgumentException);
            RowAttribute row = CreateRowAttribute();

            row.ExceptionMessage = expectedExceptionMessage;

            string extractedExceptionMessage = RowTestFramework.GetExpectedExceptionMessage(row);

            Assert.That(extractedExceptionMessage, Is.SameAs(expectedExceptionMessage));
        }
Ejemplo n.º 7
0
        public void IsSpecialValue_Null()
        {
            bool isSpecialValue = RowTestFramework.IsSpecialValue(null);

            Assert.That(isSpecialValue, Is.False);
        }
Ejemplo n.º 8
0
        public void IsSpecialValue_True()
        {
            bool isSpecialValue = RowTestFramework.IsSpecialValue(SpecialValue.Null);

            Assert.That(isSpecialValue, Is.True);
        }
Ejemplo n.º 9
0
        public void IsRowTest_MethodIsNull()
        {
            bool isRowTest = RowTestFramework.IsRowTest(null);

            Assert.That(isRowTest, Is.False);
        }