Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happended to nunit extensions/rowtest?

Tags:

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 happened to it?

like image 443
Allrameest Avatar asked Nov 01 '10 14:11

Allrameest


People also ask

Why is xUnit skipping tests?

When you have the ignore attribute above a testmethod the test will be skipped. Now when you run your tests you will see that this test has been skipped. Indicated by the yellow exclamation mark.

Which is better NUnit or xUnit?

As far as NUnit vs. XUnit vs. MSTest is concerned, the biggest difference between xUnit and the other two test frameworks (NUnit and MSTest) is that xUnit is much more extensible when compared to NUnit and MSTest. The [Fact] attribute is used instead of the [Test] attribute.

Is xUnit compatible with .NET framework?

It's an open source unit testing tool for . Net framework that's compatible with ReSharper, CodeRush, TestDriven.Net, and Xamarin. You can take advantage of xUnit.Net to assert an exception type easily.


2 Answers

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
}
like image 71
Chris Missal Avatar answered Sep 22 '22 06:09

Chris Missal


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.

like image 39
AdaTheDev Avatar answered Sep 20 '22 06:09

AdaTheDev