Implementing the ItemService tests

Let's continue by implementing the ItemService test part. As a first step, we should proceed by creating a new Catalog.Domain.Tests project in the tests folder using the following CLI instruction:

dotnet new xunit -n Catalog.Domain.Tests -f netcoreapp3.1

The preceding command creates a new Catalog.Domain.Tests project in the tests folder. Therefore, we can proceed by adding the new project to the solution using the following instruction:

dotnet sln ../Catalog.API.sln add Catalog.Domain.Tests

Additionally, the test project has some dependencies. Furthermore, we can proceed by adding the reference using the following command to the Catalog.Domain.Tests folder:

dotnet add reference ../Catalog.Fixtures ...

Get Hands-On RESTful Web Services with ASP.NET Core 3 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.