Category Archives: BDD

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 XUnit.net. 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 Uncategorized | Leave a comment

BDD – Files/Folders/Namespaces (BDD)

Files/FoldersOne thing that can be troublesome when moving to a BDD style approach is how to organize your files and folders, so far I’ve tried two approaches: One class in each file – So if you have When_associating_an_order_with_a_customer and When_associating_an_order_with_a_preferred_customer then … Continue reading 

Also posted in IronPython, Python | 4 Comments

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 

| 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 

| 13 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 

| 8 Comments

PabloTV: Eliminating static dependencies screencast

Nature abhors a vacuum.  It turns out she also abhors static dependencies (I have my sources).  Static dependencies are the modern-day globals, often exposed through classes named “Helper”.  I’ve certainly been guilty of overusing static dependencies in the past, with … Continue reading 

| 13 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 

| 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 

| Leave a comment

NBehave + NSpec

So, quickly, I decided to go ahead and throw NSpec into the mix on top of NBehave.  Why not!  Here is what the example from my previous post would look like using NSpec: [Test, Story] public void Load_checkout_information() { CheckoutOrderDTO checkoutOrderDTO … Continue reading 

Also posted in Boo, DSL | 4 Comments

NBehave Experiment: MonoRail Controllers & Rhino Mocks

…whoever keeps His word, truly the love of God is perfected in him. By this we know that we are in Him. — 1 John 2:5 Well I decided it was finally time I took a look at NBehave as … Continue reading 

Also posted in DotNet, Python | Leave a comment