Add NUnit Tests
Add Nunit test adapter
- Choose Tools > Extensions and Updates
- In the Extensions and Updates dialog box, expand the Online category and then Visual Studio Marketplace. Then, choose Tools > Testing.
- Select the NUnit test adapter and then choose Download.
Add Tests
-
Create a class library project and add it to your solution.
For convinience name it like your main project and add .Tests as a suffix.
-
Install the plug-in. In Solution Explorer, select the class library project, and then choose Manage NuGet Packages from its right-click or context menu.
-
In the NuGet Package Manager window, search for and select the plug-in (NUnit), and then choose Install.
The framework is now referenced in your project under References.
-
From the class library project's References node, select Add Reference.
-
In the Reference Manager dialog box, select the project that contains the code you'll test.
-
Code your unit test.