简体   繁体   English

什么附加到nunit扩展/ rowtest?

[英]What happended to nunit extensions/rowtest?

In NUnit 2.4.7, nunit.framework.extensions.dll was included which made it possible to do RowTests. 在NUnit 2.4.7中,包含了nunit.framework.extensions.dll,这使得可以进行RowTests。

When downloading the newest version (2.5.8) I can't find it. 下载最新版本(2.5.8)时,我找不到它。 What happened to it? 这是怎么回事?

Instead of using RowTest , you can use TestCase . 您可以使用TestCase ,而不是使用RowTest A previous testing using RowTest would look like: 使用RowTest的先前测试看起来像:

[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相同的是这样的:

[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 RowTest是暂时合并的扩展,在2.5 Alpha 2中被删除

Quote from the Release Notes for 2.4.8 : 引自2.4.8发行说明

NUnit now includes the RowTest extension, written by Andreas Schlapsi, in it's extension assemblies. NUnit现在包括由Andreas Schlapsi编写的RowTest扩展,在它的扩展程序集中。 This extension allows you to write test methods that take arguments and to provide multiple sets of argument values using the RowAttribute. 此扩展允许您编写带参数的测试方法,并使用RowAttribute提供多组参数值。 To use RowTest, your test must reference the nunit.framework.extensions assembly. 要使用RowTest,您的测试必须引用nunit.framework.extensions程序集。

Note: Merging extensions into NUnit's own extension assembly is an experiment we are trying for this release. 注意:将扩展合并到NUnit自己的扩展程序集中是我们为此版本尝试的一项实验。 The approach may change in future releases.future releases. 该方法可能会在将来的releases.future版本中发生变化。

Quote from the 2.5 alpha 2 Release Notes : 引自2.5 alpha 2发行说明

The RowTestExtension, which was merged into the nunit extension dlls in Alpha-1, is now provided as a separate addin. RowTestExtension已合并到Alpha-1中的nunit扩展dll中,现在作为单独的插件提供。 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. 这是我们计划针对任何捆绑插件采取的一般方法,因为它允许插件的创建者提供与NUnit版本分开的更新。

You can now download the RowTest extension from here . 您现在可以从此处下载RowTest扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM