What happended to nunit extensions/rowtest?

匆匆过客 提交于 2019-12-03 09:50:58

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
}

RowTest was an extension that was merged in temporarily, and was removed in 2.5 Alpha 2

Quote from the Release Notes for 2.4.8:

NUnit now includes the RowTest extension, written by Andreas Schlapsi, in it's extension assemblies. This extension allows you to write test methods that take arguments and to provide multiple sets of argument values using the RowAttribute. To use RowTest, your test must reference the nunit.framework.extensions assembly.

Note: Merging extensions into NUnit's own extension assembly is an experiment we are trying for this release. The approach may change in future releases.future releases.

Quote from the 2.5 alpha 2 Release Notes:

The RowTestExtension, which was merged into the nunit extension dlls in Alpha-1, is now provided as a separate addin. This is the general approach we plan to take with regard to any bundled addins, since it permits the creator of an addin to provide updates separately from the NUnit release.

You can now download the RowTest extension from here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!