public void GetRowAttributes_TwoRows() { MethodInfo method = GetTestClassMethod("RowTestMethodWith2Rows"); Attribute[] rowAttributes = RowTestFramework.GetRowAttributes(method); Assert.That(rowAttributes.Length, Is.EqualTo(2)); }
public void IsRowTest_False() { MethodInfo method = GetTestClassMethod("MethodWithoutRowTestAttribute"); bool isRowTest = RowTestFramework.IsRowTest(method); Assert.That(isRowTest, Is.False); }
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)); }
public void GetTestName() { string testName = "UnitTest"; RowAttribute row = CreateRowAttribute(); row.TestName = testName; string extractedTestName = RowTestFramework.GetTestName(row); Assert.That(extractedTestName, Is.EqualTo(testName)); }
public void GetExpectedExceptionType() { Type expectedExceptionType = typeof(ArgumentException); RowAttribute row = CreateRowAttribute(); row.ExpectedException = expectedExceptionType; Type extractedExpectedExceptionType = RowTestFramework.GetExpectedExceptionType(row); Assert.That(extractedExpectedExceptionType, Is.SameAs(expectedExceptionType)); }
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)); }
public void IsSpecialValue_Null() { bool isSpecialValue = RowTestFramework.IsSpecialValue(null); Assert.That(isSpecialValue, Is.False); }
public void IsSpecialValue_True() { bool isSpecialValue = RowTestFramework.IsSpecialValue(SpecialValue.Null); Assert.That(isSpecialValue, Is.True); }
public void IsRowTest_MethodIsNull() { bool isRowTest = RowTestFramework.IsRowTest(null); Assert.That(isRowTest, Is.False); }