Naming in my BDD-style Specification base class

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

One thing I really like in my BDD specification base class (found here) is how I’ve renamed the Rhino Mocks - Record - Playback model to be more expressive.

However, there is one part I am really not happy with… the naming of the Playback using statement.

Currently I’ve put it of as “What_SUT_Should_Result_To” but that doesn’t really express what the code does inside… my suspicions were confirmed this morning also by JP who mentioned that it looks good, but that he is not in love with that method name.

So, what could I call it to make it express intent better? Here are some examples:

- How_SUT_should_be_used
- When_SUT_is_used
- When_SUT_functionality_is_used
- When_SUT_is_used_like
- When_SUT_functionality_is_used_like
- When_SUT_is_called
- When_SUT_functionality_is_called

The sound of “When_SUT_functionality_is_used_like” sounds good in combination of the previous using statement:

using (How_SUT_should_Behave) {
           …
}

using (When_SUT_functionality_is_used_like) {
            …
}

What do you think? Do you have any ideas?

Cheers!


Filed under: BDD, C#
Written on: 16 Jan 2008 ·

kick it on DotNetKicks.com

Leave a Reply