Contents tagged with unit tests

  • Creating and Running Tests

    Building out the test project NOTE: the initial test project should have been created as an xUnit project. Towards that end I have added the command: yo aspnet xunit Pubs.Data.Test --version-current to the yoCommands.txt file and run it to use that as the test project. To create tests we will need to open up the Pubs.Data.Test project, then either delete the Class1.cs file, then add a new class named StoresTest, or else rename the Class1 class to StoresTest. Next open up the csproj file and add the following lines to dependencies, either manually or by using the NuGet Package Manager extension of VS Code: "Pubs.Data": "1.0.0-*"”Microsoft.EntityFrameworkCore”: “1.1.0”,"Microsoft.Extensions. … more