If Self-Documenting Code is the What, Unit Tests are the Why

It is not enough to just write code that is clean and self-documenting.? Eliminating comments and replacing them with clear variable and method names, will tell the reader of your code clearly what it is doing, but it will not properly express why it is doing it. If you recall from my original post on […]

Read More

Behaviors with MSpec

In my previous posts, I showed the syntax for context/specifications using Machine.Specifications (or MSpec for short) and how to use an auto mocking container in conjunction with this excellent Behavior-Driven Development (BDD) framework. For this post, I want to show you one of the nice features of MSpec called behaviors. Suppose we have to create […]

Read More

Unity/Moq – AutoMocker or AutoMockingContainer

What is an Auto Mocking Container? This post started to get a little long, so I won?t re-explain the concept. Joshua Flanagan wrote a nice overview at his Los Techies blog: Auto mocking Explained. My post is mainly here to describe the Unity version of an automocking container I threw together. In Jan 2009 I […]

Read More

StatLight – Goes Open Source

Although I made a very minor attempt at making StatLight a “for-sale” product, I knew when I started that open-source was most likely going to be my long term path for StatLight. What is it? (Silverlight Testing Automation Tool) StatLight is a tool developed for automating the setup, running, and gathering results of Silverlight unit […]

Read More

Wrapping up the StructureMap Automocking Container

UPDATE: I apologize…the original wrapper did not allow injected dependencies.  I have fixed this bug and updated the sample.

I have been using StructureMap.AutoMocking with MSpec (Machine.Specifications) and Rhino.Mocks for a few months now. Although I am very comfortable with the patterns that emerge from using the frameworks together, introducing StructureMap.Automocking to other developers is sometimes challenging. I decided to wrap the details of the container to make the intention clearer and explanation easier. I have started using this wrapper in my projects, and have found it makes building up specifications more efficient in my daily coding.

Read More

Find me



The opinions and content expressed here are my own and not those of my employer.