3 ms·
> I am worried about the server I'm targeting behaving in a way that's different than my expectations This is the responsibility of system or integration tests
by sagichmal 9y ago
> I am worried about the server I'm targeting behaving in a way that's different than my expectations
This is the responsibility of system or integration tests, not unit tests. (Unit tests are what's under discussion in the article.)
> What harm is done by using the real object, under the circumstances I described?
Time, energy, and effort, all of which inevitably lead to longer (slower) dev/test cycles.
- sdhgaiojfsa 9y ago> Time, energy, and effort My contention is that using real objects normally does not take materially more of any of these, and thus that most code is served best by being tested only by integration and regression tests. Where my contention is untrue, apply your best judgment, of course. :)