DEV Community

Discussion on: My personal take on TDD

Collapse
 
grahamcox82 profile image
Graham Cox

the design of classes and how they should interact

That quote there is key to what I was saying. You are talking about class*es* plural, and the interactions between them. To me, that's an Integration Test and not a Unit Test.

Integration Tests I absolutely agree that Test-First TDD works great for. Write the tests for the feature as a whole, and then implement the individual units to make it work.

And I know full well that Test-First TDD works wonders at the Unit Test level for a lot of people. And that's fine. I'm just not one of them, and that's fine too.

Collapse
 
anjdreas profile image
Andreas Gullberg Larsen

What I meant to say, is that I use TDD for both unit testing and integration tests. Once the interaction of classes is defined in my design, then I know better what each class should be responsible for and can start unit testing those.