I just published an early relese of my Simulated.FileSystem library. This library makes it easier to separate platform concerns out of my models. It works really well with a hexagonal architecture. This library will define a set of ports for common external dependencies, with multiple adapters for each port. The initial release just includes a [...]
Posts Tagged ‘no mocks’
New Simulators Library
Posted in post, tagged Agile, file system, no mocks, Simulator, tdd on May 3, 2012 | Leave a Comment »
Mock Free Example, Part 3: Fixing Untestable Code Sequences
Posted in post, tagged design, example, no mocks on July 27, 2011 | 6 Comments »
In my character printer, at one point I had someĀ code like this monstrosity. I know it’s a monster, because testing it Requires at least one test double (the _character field). Involves running a bunch of code not related to the unit test at hand. Many people don’t think this code is so bad. They discuss [...]
Mock Free Example, part 2: Simulators
Posted in post, tagged design, example, no mocks, Simulator on July 5, 2011 | 4 Comments »
One of the common uses for mocks is to replace expensive or stateful components, such as file systems, networks, GUIs, and databases. However, I also see a cluster of other problems that arise at interfaces with these types of components, especially when they are system-level services: Primitive obsession. Rarely are these APIs written as methods [...]
Mock Free Example, Part 1: Project Intro
Posted in post, tagged design, example, no mocks, tdd on June 7, 2011 | 6 Comments »
Previously, I presented mocksĀ as nuclear weapons. Unsurprisingly, commenters wanted examples. I exist to serve. This series will discuss a partly-completed project that I have lying around. The project isn’t perfect. But it will serve to discuss some of the ideas. Since it’s only partly complete, some ideas visible in this stage that would likely become [...]
Decoupled Design
Posted in essay, tagged design, no mocks, tdd on March 12, 2011 | 2 Comments »
Recently, I’ve had a large number of discussions around the use of mocks for testing, probably because I keep saying that Mocks are Evil. As a result, I’ve had to articulate how I design systems.
