Category Archives: TDD

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 

| 4 Comments

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 Uncategorized | 2 Comments

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 BDD | 7 Comments

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 

| 11 Comments

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 

| 11 Comments

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 BDD, Unit Testing | 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 

| 7 Comments

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 ALT.NET, E-VAN | 1 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 Uncategorized | 1 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 BDD | 7 Comments