How to exclude test categories by default for ‘dotnet test’ CLI Posted by By sven.huebner.it September 30, 2021Posted inTesting Exclude test categories from "dotnet test" by default via a TestCaseFilter in your .runsettings file.
Record type gotcha with FluentAssertions 5 Posted by By sven.huebner.it July 22, 2021Posted inTesting Use version 6+ of FluentAssertions when asserting equality of record types with collections in them.
Use Collection Initializers To Simplify Tedious Mapping and Validation Tests Posted by By sven.huebner.it October 18, 2020Posted inTesting With custom collection initializers, you can avoid writing repetitive test methods for mappers, converters and validators by using parameterized tests with type-safe yet generic test samples based on expressions and corresponding values.
Improve your parameterized Tests with named ValueTuples Posted by By sven.huebner.it October 13, 2020Posted inTesting For parameterized tests, declare your samples as value tuple array and subsequently "Select" it to IEnumerable to be type-safe, concise and descriptive.