Top "Nunit" questions

NUnit is an open source unit testing framework for .NET and Silverlight written in C#. It serves the same purpose as JUnit or TestNG does in the Java world, and is one of many in the xUnit family.

NUnit expected exceptions

I've got a set of test cases, some of which are expected to throw exceptions. Because of this, I have …

c# nunit continuous-integration teamcity
CollectionAssert in jUnit?

Is there a jUnit parallel to NUnit's CollectionAssert?

java junit nunit assertion
Replace Console.WriteLine in NUnit

I haven't done much with NUnit before, but I just wanted to dump some text to a window in a …

c# .net debugging nunit
Assert.That vs Assert.True

What to prefer: Assert.That(obj.Foo, Is.EqualTo(true)) or Assert.True(obj.Foo) For me, both asserts are …

c# unit-testing nunit
Unit Testing File I/O

Reading through the existing unit testing related threads here on Stack Overflow, I couldn't find one with a clear answer …

c# unit-testing file-io dependency-injection nunit
Test with NO expected exception

I want to create NUnit test to ensure that my function does not throw an exception. Is there some specific …

c# .net unit-testing testing nunit
How do I test an async method with NUnit (or possibly with another framework)?

I have an ASP.NET Web API application, with an ApiController that features asynchronous methods, returning Task<> objects …

.net unit-testing asynchronous nunit async-await
Does MSTest have an equivalent to NUnit's TestCase?

I find the TestCase feature in NUnit quite useful as a quick way to specify test parameters without needing a …

c# nunit mstest testcase rowtest
When do I use the TestFixtureSetUp attribute instead of a default constructor?

The NUnit documentation doesn't tell me when to use a method with a TestFixtureSetup and when to do the setup …

c# unit-testing nunit
NUnit 3.0 and Assert.Throws

I am writing some unit tests with NUnit 3.0 and, unlike v2.x, ExpectedException() has been removed from the library. Based …

c# unit-testing nunit nunit-3.0