4 ms·
The last D is design... Write your test as if the perfect domain model existed already, and then make it work. E.g. does it make more sense to write person.Age
by joshka 10y ago
The last D is design...
Write your test as if the perfect domain model existed already, and then make it work. E.g. does it make more sense to write person.Age = 21, or person.Birthday = someDate.
Alternatively, taking your math example, your tests are the constraints of an equation that your code solves.
- stevesun21 10y agoBased on what I learnt I am not really see the last D is design. https://en.m.wikipedia.org/wiki/Test-driven_development https://en.m.wikipedia.org/wiki/Test-driven_development http://martinfowler.com/bliki/TestDrivenDevelopment.html http://martinfowler.com/bliki/TestDrivenDevelopment.html