3 ms·
Came here to say exactly that. The author is advocating for mockist style of unit testing, which is quite terrible for many, many reasons. What you are describi
by spawarotti 6y ago
Came here to say exactly that. The author is advocating for mockist style of unit testing, which is quite terrible for many, many reasons. What you are describing is classic unit testing, and this is the way to go.
Good article and book about it:
- https://enterprisecraftsmanship.com/posts/unit-testing-dependencies https://enterprisecraftsmanship.com/posts/unit-testing-depen...
- Unit Testing Principles, Practices, and Patterns
- pydry 6y agoMain reason it it tests unrealistically, I think. The other issues (doesnt catch bugs, hard to maintain) tend to flow from that.
- gwbas1c 6y ago> The author is advocating for mockist style of unit testing IMO: "mockist" style of unit tests are best for corner cases that can only be tested in isolation. For example, error conditions that are important to verify, but so difficult or impossible to test that the only way to test them is to test a single class in isolation.