: Reverse TDD
I wanted to develop the "checkout flow" for my thingie. I wasn't quite sure what primitives would be needed so I decided to prototype it.
1. Built HTML and handlers, with all logic built into the handlers. Tweak until it the "happy flow" does most of what I want and a few "error flows" work. Manual testing.
2. Move all logic into static methods. More manual testing to make sure it still does the same thing
3. Reorganize logic into classes with proper DI (and defaults). More manual testing
NOW, I can start TDD'ing
4. Write tests using mocks.
5. Come up with a variety of new test cases. Fix code/tests. Go to 4 until bored
Tags: tdd
I wanted to develop the "checkout flow" for my thingie. I wasn't quite sure what primitives would be needed so I decided to prototype it.
1. Built HTML and handlers, with all logic built into the handlers. Tweak until it the "happy flow" does most of what I want and a few "error flows" work. Manual testing.
2. Move all logic into static methods. More manual testing to make sure it still does the same thing
3. Reorganize logic into classes with proper DI (and defaults). More manual testing
NOW, I can start TDD'ing
4. Write tests using mocks.
5. Come up with a variety of new test cases. Fix code/tests. Go to 4 until bored
Tags: tdd
enraged
bouncy