diff options
Diffstat (limited to 'Writing a test double before the real implementation gives feedback on design.md')
-rw-r--r-- | Writing a test double before the real implementation gives feedback on design.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Writing a test double before the real implementation gives feedback on design.md b/Writing a test double before the real implementation gives feedback on design.md new file mode 100644 index 0000000..9412676 --- /dev/null +++ b/Writing a test double before the real implementation gives feedback on design.md @@ -0,0 +1,14 @@ +--- +tags: + - tdd + - software-design + - architecture + - software-engineering +--- +https://github.com/testdouble/contributing-tests/wiki/Don't-mock-what-you-don't-own + +The primary value of a test double from a TDD perspective is that it provides **cheap feedback** on the design of an object. Because we can play with its interface before actually having to use it, it is cheap to throw away and start over (vs having implemented all sorts of other stuff around it). + +This is alternatively called "Increased Usage", referring to that a test is an additional usage of a function (which normally sometimes have just a single caller anyway) and that while writing a few test cases you'll quickly get a feel of if the API is good or bad. + +[[London-style versus Detroit-style TDD]]
\ No newline at end of file |