NUnit & Visual Studio
TRACK

NUnit & Visual Studio

Avatar

Many people starting out with Unit testing get stuck when it comes to using their tools with the Visual Studio environment.  If it isn’t built in, how do we make it work with Visual Studio?  In this article I want to explore the basics of creating a unit test for NUnit and getting it running from Visual Studio. Basic Structure To create a unit test, the first thing you will need to do is to create an assembly with a class file to hold the code. The type of assembly you will need to create for your test to be able to run is an assembly of type "Class Library." I'm going to assume that you don't need the details on how to create that type of project using whatever version of Visual Studio you happen to be using. Within your new Class Library project, you should find a file named Class1.cs. For the purposes of getting started, you can just leave that file. We'll talk about how to name your class and test later on. For now, all we want to concentrate on is the basics of what is in

Comments

Avatar