Category Archives: BehaviorDrivenDevelopment

Encapsulation and thinking behaviorally

I’ve been reading quite a bit lately about setters and encapsulation, but for whatever reason, it never really “clicked” for me.  I thought I was developing behaviorally, as I’ve been using the Context/Specification style of BDD specifications for a while.  … Continue reading 

Also posted in BDD | 4 Comments

Arrange Act Assert and BDD specifications

With Rhino Mocks 3.5 just around the corner, I’ve started using it to create much more readable tests.  One of the things that always bothered me with Expect.Call, constraints and the like was that it mixed in the Arrange with … Continue reading 

Also posted in BDD, Tools | 14 Comments

Separation of Concerns by example: Part 4

In the last part, we finally broke out the caching and data access concerns from our original class.  The series so far includes: Separation of Concerns – how not to do it Separation of Concerns by example: Part 1 – … Continue reading 

Also posted in BDD, Refactoring | 8 Comments

Eliminating obscure tests

One of the purported benefits of unit tests and TDD in general is unit tests doubling as living documentation.  Unit tests are documentation in the form of executable client code demonstrating small units of behavior.  The idea is that if … Continue reading 

Also posted in BDD, TDD | Leave a comment

Converting tests to specs is a bad idea

When I first started experimenting with BDD, all the talk about the shift in language led me to believe that to “do BDD” all I needed to do was to change my “Asserts” to some “Shoulds”.  At the root, it … Continue reading 

Also posted in BDD | 2 Comments