Using Moq Callback to set values to drive tests

How to set a value on an object passed to a mock to drive conditional logic further in the system under test

June 23, 2020 · 3 min

How To Assert Collection Count With FluentAssertions

Asserting numbers of items in a list or collection is vital to unit tests, but which to choose?

June 16, 2020 · 1 min

Getting Microsoft Feature Management Working in a Console App

Looking a the new version of Microsoft’s Feature Management nuget package and how to get it working in a console application without Azure!

May 19, 2020 · 4 min

C#8 Using Declarations With FluentAssertions

Harnessing the power of the C# 8 using declarations to aid with unit test assert clarity

May 5, 2020 · 4 min

Inject JsonSerializerOptions so Don't Repeat Yourself

How many times do you create a private options variable when using json serializer and end up with duplicate code? Let’s take a look at one option to help resolve this.

March 31, 2020 · 2 min

Mocking ILogger with Moq

Looking at how to verify calls to Ilogger based extension methods using Moq.

February 6, 2020 · 9 min

Integration Testing with ASP.NET Core 3.1 - Swapping a Dependency with Moq

Investigating how to write integration tests while swapping out dependencies with mocked instances using Moq

December 23, 2019 · 5 min

Reduce Method Parameter Checking

How to make you method parameter checks not take up a chunk of the method body

December 18, 2019 · 4 min

Integration Testing with ASP.NET Core 3.1 - Remove the Boiler Plate

Writing integration tests for your application while keeping your tests as DRY as possible by removing the boiler plate code

December 16, 2019 · 5 min

Integration Testing with ASP.NET Core 3.1 - Swapping a Dependency

Looking at how you can write integration tests for your application but swapping out a 3rd party dependency

December 11, 2019 · 6 min