Implementing .NET tests with xUnit
In this section, we are going to implement some backend unit tests on our question controller using a library called xUnit. Before we do this, we are going to become familiar with xUnit by implementing some unit tests on a class with no dependencies.
Getting started with xUnit
In this section, we are going to create a new project in our backend Visual Studio solution and start to implement simple unit tests to get comfortable with xUnit, which is the tool we are going to use to run our backend tests. So, let's open our backend project and carry out the following steps:
- Open up the Solution Explorer window, right-click on Solution, choose Add, and then choose New Project....
- Select xUnit Test Project from the dialog box that opens and click on the Next button:
- Enter BackendTests&...