2 ms·
>But even there, you can at the very least mock the responses of the database (or other external systems) and check if the data in your response is as expected.
by MoreQARespect 3y ago
>But even there, you can at the very least mock the responses of the database (or other external systems) and check if the data in your response is as expected.
You certainly can but these tests end up mimicking the implementation rather than actually testing the code.
A pure CRUD app - even if it's relatively complicated - should have zero unit tests.
- DarkNova6 3y agoI guess you can technically test everything in a CRUD app as integration test. Doesn't mean you should. Surely, you have a baseline of verification/validation logic for which unit tests are the best fit. And based on my experience of my last project, if you can't do proper unit testing you likely have the wrong granularity in your methods and classes.