3 ms·
> But aren't unit tests a duplication of your code, already? No, as you'd only be specifying the input and output state, e.g. the change of a model's attribute
by slhck 9y ago
> But aren't unit tests a duplication of your code, already?
No, as you'd only be specifying the input and output state, e.g. the change of a model's attributes or the correctness of a mathematical calculation. The code that implements the (business) logic of going from input to output state should be part of your application, not the test.