views:

29

answers:

1

Hello,

I have the following test method (VB.NET)

<RowTest()> _
<Row(1, 2, 3)> _
Public Sub AddMultipleNumbers(ByVal number1 As Integer, ByVal number2 As Integer, ByVal result As Integer)

    Dim dvbc As VbClass = New VbClass()

    Dim actual As Integer = dvbc.Add(number1, number2)

    Assert.That(actual, [Is].SameAs(result))
End Sub

My problem is that when the test runs, using TestDriven.Net, the three method parameters are 0 and not the values I am expecting. I have referenced the NUnit.Framework (v.2.5.3.9345) anf the NUnitExtension.RowTest (v.1.2.3.0).

+1  A: 

Instead of using the RowTest extension, try using the TestCase parameterized test now built into NUnit.

I wrote a blog post showing how to convert from one to the other. It's in C# but should be easy enough to convert.

Pedro