Home » TDD

Tag Archives: TDD

TDD vs. BDD or why can’t we all just get along?

I was listening to another good Hanselminuets podcast – Understanding BDD and NSpec with Matt Florence and Amir Rajan. As always it was a good an informative show. Towards the end of the show one of the interviewees (I think it was Amir) explained why BDD is much better than TDD…  by djclear904 For those of you who does not ...

Read More »

A bad test

This is a bad test, because what it does is ensuring that something does not works. I just finished implementing the session.Advaned.Defer support, and this test got my attention by failing the build. Bad test, you should be telling me when I broke something, not when I added new functionality. Reference: A bad test from our NCG partner Oren Eini ...

Read More »

WPF View Smoke Testing

I enjoy TDD. I enjoy the way it makes me code and I enjoy the rhythm. That is, I really enjoy TDD’ing the logic in my applications: The business logic, the controller logic, the domain logic; wherever there is logic that I can isolate and unit test cleanly TDD is just all fun and productivity. I enjoy TDD’ind integration points ...

Read More »

Behavior Driven, Test Driven, Domain Driven Design

Ah, the joys of xDDs, you can never use too many, right? One of the many benefits of using event sourcing with CQRS is how well it facilitates using BDD style testing to drive our domain model design. Behavior driven development encourages writing tests which expose the use cases or scenarios required by the users and stakeholders. This is closely ...

Read More »

Why you need to make your tests fail

Test Driven Development (TDD) have many benefits. For start it’s a design methodology that help avoiding “Analysis paralysis” and make sure that you only have the needed code to solve a problem. Yesterday I found another benefit of writing the tests before the code – you get to see them fail! A while back I wrote about another shortcoming of ...

Read More »

Is TDD Evolving?

Something strange is going through TDD land these last couple of weeks. First it was Uncle Bob,with a new TDD theory – making tests pass in a certain order, actually helps incremental design, leading to a better solution. This is a very interesting post, and if he’s right, he might have discovered the cornerstone of ALM 2.0. Following that Mark ...

Read More »

Smelly Code: Direct Object Instantiation as a Testability Killer

This Smelly Code post discusses mainly a testability issue without going into further detail on other things like readability which could be improved for sure as well. Original, smelly code public Account ReadCompleteAccountByADUsernameAndServiceUID(string adUsername, string serviceInstanceUID) { IList<Address>> addresses; IList<Contact> contacts; MasterDataBL masterDataBL = new MasterDataBL(); Account result = AccoDao.ReadCompleteAccountByADUsernameAndServiceUID(adUsername, serviceInstanceUID, ConnectionString.Master, out addresses, out contacts); result.PhoneNumber = contacts.Where(x => ...

Read More »