What happended to nunit extensions/rowtest?

前端 未结 2 757
名媛妹妹
名媛妹妹 2021-02-12 14:06

In NUnit 2.4.7, nunit.framework.extensions.dll was included which made it possible to do RowTests.

When downloading the newest version (2.5.8) I can\'t find it. What hap

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-12 14:30

    Instead of using RowTest, you can use TestCase. A previous testing using RowTest would look like:

    [RowTest]
    [Row("foo", false)]
    [Row("", true)]
    public void Some_test(string value, bool expected)
    {
      // test
    }
    

    And the same thing with TestCase looks like this:

    [TestCase("foo", false)]
    [TestCase("", true)]
    public void Some_test(string value, bool expected)
    {
      // test
    }
    

提交回复
热议问题