public void RunTestMethod_WithNullArgument() { object[] arguments = new object[] { null }; TestClass testFixture = new TestClass(); RowTestCase testCase = CreateRowTestCase(testFixture, Method_RowTestMethodWithNullArgument, arguments); TestCaseResult result = new TestCaseResult(testCase.TestName.Name); testCase.RunTestMethod(result); Assert.That(testFixture.Arguments, Is.Not.Null); Assert.That(testFixture.Arguments[0], Is.Null); }
public void RunTestMethod_WithArguments() { object[] arguments = new object[] { 42, 53 }; TestClass testFixture = new TestClass(); RowTestCase testCase = CreateRowTestCase(testFixture, Method_RowTestMethodWith2Rows, arguments); TestCaseResult result = new TestCaseResult(testCase.TestName.Name); testCase.RunTestMethod(result); Assert.That(testFixture.Arguments, Is.Not.Null); Assert.That(testFixture.Arguments[0], Is.EqualTo(arguments[0])); Assert.That(testFixture.Arguments[1], Is.EqualTo(arguments[1])); }
public void RunTestMethod_WithNormalAndNullArguments() { object[] arguments = new object[] { 42, null }; TestClass testFixture = new TestClass(); RowTestCase testCase = CreateRowTestCase(testFixture, Method_RowTestMethodWithNormalAndNullArgument, arguments); #if NUNIT_2_5 TestResult result = new TestResult(testCase); #else TestCaseResult result = new TestCaseResult(testCase.TestName.Name); #endif testCase.RunTestMethod(result); Assert.That(testFixture.Arguments, Is.Not.Null); Assert.That(testFixture.Arguments[0], Is.EqualTo(arguments[0])); Assert.That(testFixture.Arguments[1], Is.Null); }