M
MJG
With the MbUnit test framework there's a nice compact syntax for writing an
"array" of tests.
In C# this looks like:
[TestFixture]
public class DivisionFixture
{
[RowTest]
[Row(1000,10,100.0000)]
[Row(-1000,10,-100.0000)]
[Row(1000,7,142.85715)]
[Row(1000,0.00001,100000000)]
[Row(4195835,3145729,1.3338196)]
public void DivTest(double numerator, double denominator, double
result)
{
Assert.AreEqual(result, numerator / denominator, 0.00001 );
}
}
I'm attempting to use this in VB.NET but don't know the equivalent syntax.
Is it even possible?
I've tried things like:
<RowTest()><Row(1000, 10, 100.0)> Public Sub Test...
And a few variations but the syntax checker rejects them all!!
If you know about this I'd appreciate some insight.
Mike.
"array" of tests.
In C# this looks like:
[TestFixture]
public class DivisionFixture
{
[RowTest]
[Row(1000,10,100.0000)]
[Row(-1000,10,-100.0000)]
[Row(1000,7,142.85715)]
[Row(1000,0.00001,100000000)]
[Row(4195835,3145729,1.3338196)]
public void DivTest(double numerator, double denominator, double
result)
{
Assert.AreEqual(result, numerator / denominator, 0.00001 );
}
}
I'm attempting to use this in VB.NET but don't know the equivalent syntax.
Is it even possible?
I've tried things like:
<RowTest()><Row(1000, 10, 100.0)> Public Sub Test...
And a few variations but the syntax checker rejects them all!!
If you know about this I'd appreciate some insight.
Mike.