171 reputation
5
bio website none
location Berlin, Germany
age 36
visits member for 3 years, 3 months
seen Jul 7 at 11:08

Kiwi software developer based in Berlin, Germany.

I'm passionate about writing code that won't make someone want to kill me in a few years time. To that end I'm interested in Domain Driven Design, TDD and design patterns.


May
7
comment A weakness of the TDD method?
@Belin Spoike has said what I would have - you should only be writing one test at a time. These tests can come from various places - the spec, known bugs or limitations in the current code, or known parts of the implementation that need testing (for example if you introduce an if statement, you know you need to test both branches). As you add these new tests you will often break (and then fix) earlier tests - this is part of the methodology. Of course TDD is also a pragmatic methodology, so these rules are often breakable, but when learning the approach it is advised to follow them closely.
May
7
comment A weakness of the TDD method?
What you have described is for many reasons not TDD. Two most obvious are that rather than writing a test, you have started with three, and that you have missed the "Do the simplest possible thing to make the test pass" step and replaced it with "write production code" which is not at all TDD. You have jumped directly to an implementation. By jumping to an implementation your tests will tend to be more tightly coupled to that implementation.