Category Archives: TDD

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 Rant | Leave a comment

BDD on Steroids

In the last couple of weeks I had a chance to sprinkle some of JP’s syntactic sugar, all over my projects. It’s amazing how much more concise my units test have become. I’ve had a couple of issues where I … Continue reading 

Also posted in C# | Leave a comment

How to Configure Selenium RC for Use In C# NUnit Tests

When I set about integrating Selenium into my test suites, I found all the information I needed to do that with but had to hunt and peck through my google searches to find it.  So, as a point of reference, … Continue reading 

Also posted in C# | Leave a comment

True Swiss don’t like mocks!

Preface Hey, we Swiss are proud of our products! Have you ever owned a real Swiss Watch like this nice Rolex shown in the first picture? Or did you ever enjoy the delicious taste of Swiss chocolate? What about the … Continue reading 

Also posted in Agile, Testing | Leave a comment

Getting value out of your unit tests

Unit tests, with TDD in particular, are the most efficient way I’ve found in creating behavior for my application.  For lasting value, beyond just the safety net of “if I change something, will something break”, requires extra discipline, and a … Continue reading 


Do not test private methods

You should only be testing public methods. Private methods are an implementation detail of the object and are subject to heavy change, etc.  Any class, including test fixtures, that care about private methods on another object exhibit the “Inappropriate intimacy” … Continue reading 

Also posted in altnetconf | 1 Comment

BDD and Parameterized testing

Although I really like Astels style BDD still use a lot of parameterized testing and though I should give you an example why, using Lets say we’re testing simple SPECIFICATION style rules, in BDD we might write: [Concerning(typeof(ValidEmailRule<TestEntity>))]public class When_using_rule_on_a_null_string : … Continue reading 

Also posted in C# | Leave a comment

Where TDD fails for me

TDD is by far the sharpest tool in my belt.  The simplicity of client-driven design combined with the safety net of unit tests allow me to build software at a remarkable constant pace.  At the edges of most of the … Continue reading 


Lazy Loaded Interceptors

Patterns of Enterprise Application Architecture defines Lazy Load as: An object that doesn’t contain all of the data you need but knows how to get it.   A while back I was trying to figure out how to lazy load … Continue reading 

Also posted in Agile, Testing | Leave a comment

Mocking Queryables

Recently, we’ve been mocking out IQueryable’s as return values, which had led to setups that look like the following… programs.setup_result_for(x => x.All()).Return(new List<IProgram> {active_program,inactive_program}.AsQueryable()); I just switched over to the following syntax… by creating an extension method. programs.setup_result_for(x => x.All()).will_return(active_program,inactive_program); … Continue reading 

Also posted in TeamBuild, VSTS | Leave a comment