So your going along writing a class using TDD. Do you have any triggers that help you realize your adding a new responsibility to the class as your coding?
After that - what do you do when you discover one? Do you drop down a level and start coding the implementation, interface, and tests for that new responsibility? Do you just write up the interface and mock it out for now?
--
The only way to go fast is to go well.
---
You received this message because you are subscribed to the Google Groups "Clean Code Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clean-code-discu...@googlegroups.com.
To post to this group, send email to clean-code...@googlegroups.com.
Visit this group at http://groups.google.com/group/clean-code-discussion.
Please provide some example code to let others see a clear picture.
If the newly discovered responsibility belongs to a higher layer, I switch to TDDing the new class.
If it belongs to a lower layer, I put a test double and keep working on the current class.
If it belongs to the same layer, I write the code in the same class and extract it later on, updating the tests too.
On 8 Feb 2015, at 16:48, vivek poddar <vivek...@gmail.com> wrote:
Please provide some example code to let others see a clear picture.
On 9 Feb 2015 00:02, "Caio Fernando Paes de Andrade" <caio...@icloud.com> wrote:
If the newly discovered responsibility belongs to a higher layer, I switch to TDDing the new class.If it belongs to a lower layer, I put a test double and keep working on the current class.