I Developed a small Application in C#. I want to test my application with NUnit.I am a new to NUnit.I Installed NUnit but don’t Know How to use it what are the basic steps needed for it or please provide me a good reference link about using NUnit.
Share
I recommend you to have an own project for your tests (like
Project.Tests).Place the following basic files somewhere in folder of your project structure (e.g.
lib\nunit\nunit):nunit.core.dllnunit.core.interfaces.dllnunit.framework.dllnunit.util.dllnunit-console.exenunit-console.exe.confignunit-console-runner.dllnunit-console-x86.exenunit-console-x86.exe.configThen you need to reference the
NUnit.Frameworkassembly in yourProject.Testsproject.For example, a simple test would look like this:
You can run this test then for example with the NUnit-console or directly in VisualStudio (e.g. with the help of ReSharper) or through a MSBuild task with the help of MSBuild Community Tasks.