Here, we will not just think of an integration test as a test that executes a test method with some input parameters and asserts the result or whether or not it throws an exception, but also as something that executes real code. An integration test tests different modules of code together, not just a single one.
As part of ASP.NET Core, Microsoft has made the Microsoft.AspNetCore.Mvc.Testing NuGet package available. Essentially, it lets us host a web application so that we can execute tests over it as we would in a real-life server, taking out, of course, performance and scalability issues.
In your unit test project, create a class such as this (again, we're using xUnit):
public class IntegrationTests : IClassFixture<WebApplicationFactory<Startup>>
{
private readonly WebApplicationFactory<Startup> _factory;
public IntegrationTests(WebApplicationFactory<Startup> factory)
{
this._factory...