Tests covers creating unit tests, analyzing code coverage with the .NET CLI, using a mocking library when creating unit tests, and what features are offered by ASP.NET Core to create integration tests.
This chapter contains the following code samples:
- UnitTestingSamples
- UnitTestingSamples (Library to be tested)
- UnitTestingSamples.Tests (Tests with xUnit)
- MockingSamples (library and xUnit tests using a mocking library)
- ASPNETCoreSample (integration tests with TestServer from AspNetCore.TestHost)
For code comments and issues please check Professional C#'s GitHub Repository
Please check my blog csharp.christiannagel.com for additional information, e.g. to use UI and end-to-end tests with Appium and Playwrigth.
Thank you!