4 ms·
I didn't post that to give you something concrete to attack, I posted it because you claimed to not understand what they meant when they said they don't mock th
by mreiland 12y ago
I didn't post that to give you something concrete to attack, I posted it because you claimed to not understand what they meant when they said they don't mock that often.
I will respond to 1 point you made because I feel it's the point you're not understanding.
> Referring to my earlier example of B calling C, what if B's business logic is complex, but makes no outbound calls except to C, and C (for simplicity's sake) is also complex, but returns only a boolean result?
Theory and practice. In theory, the only thing you need to rely on is the return value. In practice, that code also relies on the runtime characteristics of the code it's calling, and this includes things like unexpected slowness, as well as unexpected exceptions (depending on the technology you're working in).
This is the entire point about a mock being a theory of reality, and getting that right is difficult.