Posts Tagged: NUnit

How to write an NUnit Addin

Posted by & filed under .Net, Miscellaneous, Unit Testing.

From version 2.2.x NUnit supports AddIns. Addins can customize NUnit’s internal behavior such as the creation of tests and their execution. An Addin should to implement the interface NUnit.Core.Extensibility.IAddin, which can be found in the assembly nunit.core.interfaces. Also the NUnit.Core.Extensibility.NUnitAddinAttribute must be applied to Addin class. The attribute parameters Name and Description represent the name [...]

How to compare equality between two objects in NUnit

Posted by & filed under .Net, .Net 3.0 / 3.5, .Net 4.0, Unit Testing.

Today I faced an issue while unit testing; I have to compare equality of two list objects(using Assert.AreEqual), but it didn’t worked as I am expected. So changed the logic and tried with object.Equals combination with Assert.IsTrue() but that also didn’t work. I couldn’t find an alternative so I resolved the issue with list item [...]

How to do code coverage with NUnit tests

Posted by & filed under .Net, Unit Testing, Visual Studio.

In this post I am talking about using Visual Studio code coverage tools to find code coverage with NUnit tests. In my current project we were using NUnit to write unit test cases. Now only we are started moving the NUnit tests to MS Tests for unit testing. It is very difficult and tedious job; [...]

How to integrate Nunit with Visual Studio 2008

Posted by & filed under Miscellaneous, Visual Studio.

While working with my tech lead, I saw he was using Nunit with VS2008. He was running tests same time he was also debugging the code. When I discussed the same with my colleague, he told me to how to integrate Nunit with Visual Studio 2008. Today I found another way to do this; but [...]