How to use IHttpClientFactory and WireMock.NET together using Moq
WireMock.NET is a popular library used to simulate network communication through HTTP. But there is no simple way to integrate the generated in-memory server with an instance of IHttpClientFactory injected via constructor. Right? Wrong! Continue readingC# Tip: 2 ways to use custom equality rules in a HashSet
With HashSet, you can get a list of different items in a performant way. What if you need a custom way to define when two objects are equal? Continue readingC# Tip: Mark a class as Sealed to prevent subclasses creation
The sealed keyword is often ignored, yet it can be important to define a proper class design. Continue readingSeeding in-memory Entity Framework with realistic data with Bogus
You don’t need a physical database to experiment with ORMs. You can use an in-memory DB and seed the database with realistic data generated with Bogus. Continue readingC# Tip: Path.Combine and Path.Join are similar but way different.
When composing the path to a folder or file location, thePath class can come in handy. Path.Join and Path.Combine may look similar, but their behavior differ in an unexpected way.
Continue reading