To test the business logic in our TripLog app we will start out by creating a new unit test project in our solution that will be responsible for testing our ViewModels. There are many options and libraries to create unit tests in .NET with Visual Studio. In this chapter we will use the NUnit Library Project template in Visual Studio for Mac.
In order to create a unit test project, perform the following steps:
- Create a new solution folder in the TripLog solution named Tests. Although this is not required, it helps keep any testing-related projects organized within the overall solution. To add a new solution folder in Visual Studio, simply right-click on the solution name, go to Add and click on Add Solution Folder, as shown in the following screenshot:
Adding a new solution folder in Visual Studio for Windows is the same process: right-click on the solution name...