开发者

nUnit rowtest extension skips my tests

开发者 https://www.devze.com 2023-01-04 00:43 出处:网络
When I use the NUnitExtension.RowTest.dll it ignores my tests in Resharper/VS2008 and Gallio Icarus.Does anyo开发者_JS百科ne have a config that works?

When I use the NUnitExtension.RowTest.dll it ignores my tests in Resharper/VS2008 and Gallio Icarus. Does anyo开发者_JS百科ne have a config that works?

    [RowTest]
    [Row(5, 6, 11)]
    public void Should_Do_RowTest(int a, int b, int expected)
    {

        Assert.AreEqual(a+b, expected);
    }


Clunkier I know, but how about?

[Test, Sequential]
public void Should_Do_RowTest(
    [Values(5,7)] int a, 
    [Values(6,9)] int b, 
    [Values(11,16)] int expected)
{
    Assert.AreEqual(a+b, expected);
}

You won't need the Extensions DLL with this code. It will perform:

Should_Do_RowTest(5,6,11);
Should_Do_RowTest(7,9,16);
0

精彩评论

暂无评论...
验证码 换一张
取 消