Re:Why Most Unit Testing is Waste [pdf]
by narrator on Thursday March 06, 2014 @08:06PM
(#7357788)
The only thing mocks are good for IMHO is when the real code takes too long to run. Actually testing that a function is called twice is not what you're testing and this level of coupling to the supposedly encapsulated behavior of the method is ridiculous. The method is not called "callMethodInClassFooTwice()" it's called calculateInterestRate() or whatever and as long as it does that right that's all that's important.
[ Parent
| on HN ]
Re:Why Most Unit Testing is Waste [pdf]
by lostcolony on Thursday March 06, 2014 @09:30PM
(#7358168)
Calls to external services and hardware, or really, any external system. It's probably quite important that your code interacts properly with the system, but you also probably don't want to interact with it every time you run the tests. Not unless you have a copy of the external system running for every developer.