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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.