|
|
|
|
|
by hendershot
1811 days ago
|
|
what the author is talking about in a short rant is classical vs mockist TDD. for better content on the subject: https://martinfowler.com/articles/mocksArentStubs.html https://martinfowler.com/articles/mocksArentStubs.html#Class... https://www.thoughtworks.com/insights/blog/mockists-are-dead... "The classical TDD style is to use real objects if possible and a double if it's awkward to use the real thing." I've been working in a classical TDD style for the past 8 years, after at least that many years of Mockist TDD. A code base built in classical TDD style is much easier to maintain and change, but it does require more test setup which can easily be pulled into re-usable test data scenarios etc. We'll use fakes for services that are external(S3, DynamoDB, third party APIs, etc), we'll use real DB code pointing to h2 instead of say postgres other than that there's no test doubles. I would not go back to using mocks by choice. |
|