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.

Different return values the first and second time with Moq

I have a test like this: [TestCase("~/page/myaction")] public void Page_With_Custom_Action(string path) { // Arrange var pathData = …

c# unit-testing nunit moq
NUnit Test Run Order

By default nunit tests run alphabetically. Does anyone know of any way to set the execution order? Does an attribute …

.net attributes tdd nunit
Moq: Invalid setup on a non-overridable member: x => x.GetByTitle("asdf")

Not sure how I can fix this, trying to do a unit test on the method "GetByTitle" Here are my …

c# nhibernate nunit resharper moq
Compare equality between two objects in NUnit

I'm trying to assert that one object is "equal" to another object. The objects are just instances of a class …

c# unit-testing automated-tests nunit
How to run Google Chrome with Selenium RC?

I am trying to test my site with Selenium RC + Nunit + asp.net. I can get my tests to work …

asp.net nunit selenium
'await' works, but calling task.Result hangs/deadlocks

I have the following four tests and the last one hangs when I run it. Why does this happen: [Test] …

c# nunit task deadlock async-await
Use NUnit Assert.Throws method or ExpectedException attribute?

I have discovered that these seem to be the two main ways of testing for exceptions: Assert.Throws<Exception&…

c# unit-testing exception nunit assert
How to escape double quotes in as a parameter to an NUnit TestCase?

I tried writing the following TestCase for an NUnit test written in VB.net: <TestCase("FirstNode", "<node id=\"…

vb.net nunit escaping testcase double-quotes
Unit test, NUnit or Visual studio?

I'm using Visual studio (sometimes resharper) to run my unit test. I heard about NUnit, but I don't know many …

c# visual-studio unit-testing nunit
Visual Studio 2013 MSTest vs NUnit

My company is upgrading our Visual Studio 2012 to 2013 Premium. In the midst of this, we are also looking to start …

visual-studio unit-testing nunit visual-studio-2013 mstest