DN
Size: a a a
DN
D
AG
AG
D
AG
D
AK
AG
D
D
If a higher-level test gives you more confidence that your application works correctly, you should have it, в результате чего сводят всю концепцию к “тестируйте всю бизнес-логику на уровне юнит тестов и немножко потестируйте интеграции, тесты никогда не дублируйте”AG
Writing a unit test for a Controller class helps to test the logic within the Controller itself. Still, this won't tell you whether the REST endpoint this Controller provides actually responds to HTTP requests. So you move up the test pyramid and add a test that checks for exactly that - but nothing more. You don't test all the conditional logic and edge cases that your lower-level tests already cover in the higher-level test again. Make sure that the higher-level test focuses on the part that the lower-level tests couldn't cover.S
D
D
AG
D
AG
AG
AG