This is another post from my unit testing anti-patterns article series. Today, we will talk about code pollution.
Value Objects and Error Messages
I haven’t done one of these for a while. This post is a review of a code submitted by a reader.
Using Value Objects to represent technical concerns
I was asked a question recently which I find quite interesting. It is actually a part of a code review request (which I’ll cover next week) but I decided to elevate it to its own blog post.
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?