Category Archives: TDD

Capturing Rhino Mocks arguments in C# 4.0

As a quick review, a test fixture has inputs and outputs.  We set up our test fixture by configuring inputs.  We observe the results through the fixture’s outputs. Inputs and outputs can be grouped into direct and indirect variants.  Direct … Continue reading 

| Comments Off

Willed and forced design

Roy Osherove, as a TypeMock employee, presents quite a dilemma from opinionated TDD blog posts simply because whether he has one or not, there’s always the question of agenda.  Which is quite unfortunate, everyone has some sort of selfish agenda … Continue reading 

Also posted in AngularJS, CQRS, introduction, REST | 14 Comments

How not to implement a failing test

One of the first things I change in ReSharper, along with one of my biggest pet peeves is a failing test that fails because of something like this: public class CombinedStreetAddressResolver : NullSafeValueResolver<Address, string> { protected override string ResolveCore(Address model) … Continue reading 

| Comments Off

Simple BDD/TDD

Todays theory is most tests and specs should be very short (2-3 lines), have at most a setup for context establishment, avoid the majority of test framework features as they should be used as an exception and not as a … Continue reading 

Also posted in misc, personal | 3 Comments

“Hero Mode Refactoring” AKA Enemy Of Brown Field Development

What do I mean by “Hero Mode Refactoring”?  We’ve all worked with code that wasn’t easily made testable. Most of the time we see a big ball of mud and have no idea where to begin. Sometimes however we have … Continue reading 

Also posted in commands, data binding, fluent Silverlight, lambda expressions, Silverlight | 23 Comments

Updated TDD Productivity Plug-in for Resharper

  I first want to thank JetBrains for being pretty awesome.  I have complained a lot about how they are constantly chaining their APIs to Resharper and as a result it makes keeping plugins very hard to maintain but they … Continue reading 


Reflecting reality

Reading over the latest MSDN magazine issue, I’m always encouraged when I see something that I consider important on the cover, Test-Driven Design.  It covers one of the more difficult technical aspects of TDD, which is mock objects.  It took … Continue reading 

| Comments Off

Subverting TDD as a design tool

So TypeMock can now mock DateTime.Now.  Replacing the functionality of DateTime.Now, which is an external dependency, was one of the first issues that taught me the value of TDD.  With TypeMock replacing DateTime.Now, I get all the benefits of unit … Continue reading 

| Comments Off

PTOM – Brownfield development – Making your dependencies explicit

Introducing DI and “poor man’s DI” Introduction Greenfield Development happens when you start a brand new project, as in, clean slate development. No legacy code lying around, no old development to maintain. You’re starting afresh, from scratch, from a blank … Continue reading 

Also posted in brownfield, legacy code, patterns, practices, PTOM, SOLID | 4 Comments

Disambiguating a test fixture

One of the more disappointing things I found reading the xUnit Test Patterns book was how much one tool could shape my views on a concept.  NUnit, as great and simple tool as it is, doesn’t quite match the other … Continue reading 

| Comments Off