Skip to Content
Building RESTful Web Services with .NET Core
book

Building RESTful Web Services with .NET Core

by Gaurav Aroraa, Tadit Dash
May 2018
Intermediate to advanced
334 pages
7h 25m
English
Packt Publishing
Content preview from Building RESTful Web Services with .NET Core

Writing unit tests

In this section, we will add a test project using ASP.NET Core 2.0 and write unit tests using xUnit. Before we start writing tests, we should set up a test project in our existing application.

The following are a few simple steps needed for our test project setup:

  1. From Solution Explorer in Visual Studio, right-click on Solution 'Chap06_01' (1 project) and click on Add | New Project... , as shown in the following screenshot:
  1. From the Add New Project template, select .NET Core and xUnit Test Project (.NET Core) and provide a meaningful name, for example, Chap06_01_Test:
  1. Add folders named Fake and Services. (Refer to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RESTful Web Services with ASP.NET Core 3

Hands-On RESTful Web Services with ASP.NET Core 3

Samuele Resca
Microservices in .NET Core

Microservices in .NET Core

Christian Horsdal Gammelgaard

Publisher Resources

ISBN: 9781788291576Supplemental Content