Testing

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 »

How to unit test Serilog LogContext with TestCorrelator

I recently had a use case where I had added custom properties to the LogContext with Serilog, and I wanted to be able to test if those properties were being added as expected. As it turns out, this is actually quite easy, thanks to a library called TestCorrelator by Mitch Bodmer over at https://github.com/MitchBodmer/serilog-sinks-testcorrelator (which

How to unit test Serilog LogContext with TestCorrelator Read More »

Scroll to Top