Combining source-generated Minimal API registration with constructor injection
Source generation can register injectable Minimal API endpoint classes and map their routes without runtime scanning or manual composition.
Source generation can register injectable Minimal API endpoint classes and map their routes without runtime scanning or manual composition.
Constructor injection keeps Minimal API handler tests focused as endpoint dependencies grow.
Bypassing JWT validation in .NET integration tests with custom tokens and a test-only authentication setup.
Testcontainers and Respawn can make testing ASP.NET Core endpoints using Entity Framework Core easier and more reliable.
Reliably testing components using Entity Framework Core can be quite problematic. Targeting a real database comes with its own challenges. Let’s solve that!
Tailoring AutoFixture’s customizations to the need of each test can cause a lot of code to be repeated. Let’s avoid that by using generic attributes.
The WebApplicationFactory can be used to create an instance of an ASP.NET Core application hosted within the test process and execute all the tests against it. We will use it to test GRPC services.
The WebApplicationFactory can be used to create an instance of an ASP.NET Core application hosted within the test process and execute all the tests against it.
NUnit constraints can be used when verifying invocations in Moq to create powerful and clear expressions.