Growing Object-Oriented Software, Guided by Tests Without Mocks (2016)

This is a review of the Growing Object-Oriented Software, Guided by Tests book (GOOS for short) in which I’ll show how to implement the sample project from the book in a way that doesn’t require mocks to be tested. Growing Object-Oriented Software, Guided by Tests Without Mocks L … | Continue reading


@enterprisecraftsmanship.com | 2 years ago

Immutable Architecture

The topic of immutable architecture described here is part of my Applying Functional Principles in C# Pluralsight course. In this post, I’d like to show a common approach to introducing immutability to your code base on an architectural level. Immutability, State, and Side Effect … | Continue reading


@enterprisecraftsmanship.com | 2 years ago

DRY vs. Damp in Unit Tests

In this post, we’ll make a deep dive into the DRY and DAMP principles and will talk about the false dichotomy around them. | Continue reading


@enterprisecraftsmanship.com | 3 years ago

Don't mock the application database, it's an implementation detail

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 thi … | Continue reading


@enterprisecraftsmanship.com | 4 years ago

Unit Testing Dependencies: The Complete Guide

Continue reading


@enterprisecraftsmanship.com | 4 years ago

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. So, how should you name a uni … | Continue reading


@enterprisecraftsmanship.com | 4 years ago

Yagni beats OCP in the vast majority of cases

In this post, I want to cover the topic of OCP vs YAGNI - contradictions between the Open/Closed Principle and the You aren’t gonna need it one. | Continue reading


@enterprisecraftsmanship.com | 4 years ago

C# and F# approaches to illegal states

C# and F# approaches to illegal states. You have probably heard of such phrase as "make illegal states unrepresentable" already. Basically, it stands for... | Continue reading


@enterprisecraftsmanship.com | 5 years ago

Use mocks for external calls, not for internal implementation details

Where to use mocks. After two article series where I preached against the use of mocks, I though I would do a post which outlines situations where they... | Continue reading


@enterprisecraftsmanship.com | 5 years ago

Unit testing anti-patterns: Structural Inspection

This post is about the practice of Structural Inspection in unit testing and why I personally consider it an anti-pattern. Structural Inspection is... | Continue reading


@enterprisecraftsmanship.com | 5 years ago

Growing Object-Oriented Software, Guided by Tests Without Mocks

Growing Object-Oriented Software, Guided by Tests Without Mocks is aimed at rewriting the sample project from the GOOS book without using mocks. | Continue reading


@enterprisecraftsmanship.com | 5 years ago

Temporal Coupling and Immutability

Temporal coupling is coupling that occurs when there are two or more members of a class that need to be invoked in a particular order. There's a deep... | Continue reading


@enterprisecraftsmanship.com | 5 years ago

EF Core 2.1 vs. NHibernate 5.1: DDD perspective

EF Core vs NHibernate. We'll compare EF Core and NHibernate from the Domain-Driven Design (DDD) perspective. And when it comes to domain modeling... | Continue reading


@enterprisecraftsmanship.com | 5 years ago