Leaking domain knowledge to tests

I’m continuing the series about unit testing anti-patterns I started a couple months ago. This article is about leaking domain knowledge to tests.

To TDD or not to TDD

To TDD or not to TDD? Is this question even relevant or maybe it’s enough to just write tests, no matter before the code or afterward? Let’s see.

NHibernate 5: async IO bound operations support

This news went mostly unnoticed but that’s actually a big one, at least for those of us who uses NHibernate as their primary ORM: NHibernate 5 now supports async IO bound operations.

.NET Value Type (struct) as a DDD Value Object

I got a suggestion recently about using .NET structs to represent DDD Value Objects to which I repeated what I’ve been saying and writing for several years now: structs are not a good choice for DDD Value Objects. But then I realized that I never actually dove into the details of why it is so.

So here it is, the blog post where we’ll talk about using .NET Value Types (structs) as DDD Value Objects and what effect it has on the domain model, performance, and mapping the model to the database using ORMs.

New course: Refactoring from Anemic Domain Model Towards a Rich One

My new training course Refactoring from Anemic Domain Model Towards a Rich One went live.

Exposing private state to enable unit testing

Last time, we talked about making private methods public in order to enable unit testing. It’s not the only way people expose implementation details to the outside world for unit testing purposes, though. Today, we’ll look at a similar anti-pattern: exposing private state.

Unit testing private methods

I’m starting a new series about unit testing anti-patterns. This post is the first article in that series.

When it comes to unit testing, one of the most commonly asked questions is: how to test a private method?

Domain events: simple and reliable solution

Today, I’d like to write about a simple and reliable way to implement domain events.

Optimistic locking and automatic retry

In this post, I’m answering a reader’s question about how to combine an optimistic locking and automatic retry.

Value Object: a better implementation

This post is about a better implementation of Value Object.