in his Google video, there are still a high percentage of ppleoe who practices bad TDD. But there is also ppleoe who is practicing BDD while their doing TDD. So what is the difference? The one thing I have seen is that most ppleoe think that TDD is about Testing. When you explain that TDD is really at its hart a design process, they squawk at you and give you a look like you’ve lost your mind.I see TDD as performing the following roles:1. Design process2. Requirements Capturing3. Behavior Specification4. Regression Test SuiteFor this reason I think we need a Behavior-Driven Development framework.My daily development environment is .NET and C#, thus I would like to have something that suites my needs. Dave is working on rSpec for RoR and then there is JBehave for java. But I was unable to find anything for the .NET space. So I thought, I will roll my own.Here is what I have so far:using NBehave;namespace SampleBehaviour{ [ Functionality ] public class CustomerLoadBehaviour { private Customer customer = null; [InitializeSpecification()] public void Setup() { customer = new Customer(123); } [ Specification() ] public void ShouldLoadCustomer() { Behaviour.Of( customer.Id ).Must.Not.Be.Null( The Customer Id must not be null. ); Behaviour.Of( customer.Id ).Must.Equal( 123, The customer id’s aren’t equal ); } [ Specification() ] public void LoadCustomerShouldFailed() { Behaviour.Of(customer.Id).Must.Not.Be.Null( The Customer Id must not be null. ); Behaviour.Of( customer.Id ).Must.Not.Equal( 125, The customer id’s aren’t equal ); } }}I’m busy working on a TestTip for VS2005, but have finished the NUnit integration.
↧