Testing

Part 3: Creating a clean test suite for C# integration tests

This post is part 3 of a 3-part series: Part 1: How to test a database in C# with TestContainers Part 2: Resetting your test database in C# with Respawn Part 3: Creating a clean test suite for C# integration tests Overview Now, we’ve got a test suite successfully running that uses a containerized database

Part 3: Creating a clean test suite for C# integration tests Read More »

Using AutoFixture with EF Core without circular references

If you’ve used AutoFixture with Entity Framework before, chances are you’ve encountered an error like this: AutoFixture.ObjectCreationExceptionWithPath : AutoFixture was unable to create an instance of type AutoFixture.Kernel.SeededRequest because the traversed object graph contains a circular reference. Or maybe this: Microsoft.EntityFrameworkCore.DbUpdateException : An error occurred while saving the entity changes. See the inner exception for

Using AutoFixture with EF Core without circular references Read More »

How to run every possible combination of arguments in xUnit

If you’ve ever made a test in xUnit with something like 8+ InlineDatas and thought that there has to be a better way… Well, there is! The Xunit.Combinatorial package by Andrew Arnott allows you to specify values in multiple CombinatorialValues attributes, then will run a separate test for each possible combination of those values. It’s

How to run every possible combination of arguments in xUnit Read More »

Scroll to Top