¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: "bottom-up" TDD and common behaviors


 

¿ªÔÆÌåÓý

We still don't know the context, but it seems like we have some kind of a thing that either has fields that are sometimes mod and sometimes not, or sometimes has mod fields added to it. That could be built in lots of interesting ways, as with an adapter that covers up the fields making them unmodifiable, or a partner object adapter that knows the secret handshake.

My basic approach would be to ask the question I want to know the answer to, roughly, "are those fields modifiable", and then let the code tell me more about the implementation. If that question became more complex to answer, that might be just fine.

Without building the thing, I cannot know.?

On Dec 2, 2019, at 2:48 PM, Steve Gordon <sgordonphd@...> wrote:

What motivates implementing a setter method under TDD unless there is a test that requires it to exist and work?? Extra tests would only be required if we also need to implement is<X>Modifiable() for some field X.


Ron Jeffries
Perfectionism is the voice of the oppressor -- Anne Lamott

Join [email protected] to automatically receive all group messages.