When to Mock

The use of mocks in unit testing is a controversial topic (maybe less so now than several years ago). I remember how, throughout my programming career, I went from mocking almost every dependency, to the "no-mocks" policy, and then to "only mock external dependencies".

None of this practices are good enough. In this article, I’ll show you which dependencies to mock, and which to use as is in your tests.

Unit Testing Dependencies: The Complete Guide

In this article, we’ll review the types of unit testing dependencies. This is more of a reference article, to which I’ll be referring in future posts. Still, this topic is important for establishing the common vocabulary.

EF Core and DDD: New online course

My new online training course DDD and EF Core: Preserving Encapsulation went live.

3 things that will make or break your project

This article is about 3 things that can make or break any software project.

Assertion messages in tests

In this post, we’ll talk about whether or not you should use assertion messages in tests.

Is Entity the same as Value Object?

In this post, we’ll discuss an interesting question about whether the concepts of Entity and Value Object are the same.

DDD and bulk operations

Combining bulk operations with Domain-Driven Design is a tough problem. In this article, we’ll look at why that is so and discuss ways to marry the two.

Combining ASP.NET Core validation attributes with Value Objects

This is a continuation of the article series about some more advanced error handling techniques.

Advanced error handling techniques

This post describes some (more) advanced error handling techniques. I’ll probably do a series because this topic is large and there’s quite a few things that need to be cleared out, but we’ll see.

You are naming your tests wrong!

Giving your tests expressive names is important. Proper naming helps understand what the test verifies and how the underlying system behaves. In this post, we’ll take a look at a popular, yet inferior naming convention and see how it can be improved.