Skip to content
Sven Hübner IT
  • Home
  • Blog

testing

  • Home
  • Blog
  • testing

Advanced MSBuild: Auto-setup test projects

Posted by By sven.huebner.it December 24, 2022Posted inBuild, General Development
You can minimize the effort of creating new test projects according to your project's conventions by defining some global default MSBuild properties. A new test project csproj will then be a five-liner consisting only of the SDK and TFM.
Read More

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.
Read More

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.
Read More

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.
Read More

Simplifying unit tests for WPF ViewModels

Posted by By sven.huebner.it October 13, 2020Posted inGeneral Development
Use custom assertion extensions to easily unit-test implementations of INotifyPropertyChanged.
Read More

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.
Read More

Performance Optimization Guided By Benchmarks

Posted by By sven.huebner.it August 22, 2020Posted inPerformance
This post is just a summary of a few things I learned about performance optimization of CPU-bound / memory-bound processes in C#/.NET. I was able to accelerate two different low-level image processing algorithms by a factor of 10 while learning a lot and enjoying the process.
Read More
Copyright 2025 — Sven Hübner IT. All rights reserved. Sinatra WordPress Theme
Scroll to Top