Category Archives: TDD

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 

| Comments Off

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 Asp.Net MVC, mvc, mvccontrib | 4 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 .Net, agile, Asp.Net, Asp.Net MVC, mvc, mvccontrib, Tools | 12 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 

Also posted in agile, c#, Open Source Software, Resharper, testing, Tools, Unittests | 5 Comments

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 

| 14 Comments

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 .Net, Asp.Net, continous integration, testing, Tools | 9 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

BDD on Creatine

In an attempt to further understand BDD, I chose to revise the code from my previous post after receiving some amazing advice from two people I regard highly (Scott & JP). I should state that this is my interpretation of … Continue reading 

Also posted in Uncategorized | 1 Comment