4 ms·
I'd suggest that if you need to document where is throwing the exception, you're doing too much work in the test. Setup code should be pretty simple and stable
by ajanuary 14y ago
I'd suggest that if you need to document where is throwing the exception, you're doing too much work in the test.
Setup code should be pretty simple and stable, so should very rarely suddenly start throwing new exceptions.
If you need to pinpoint which bit of code under test threw the exception, you're probably testing too much in one test.
Of course, the advice changes when you're using a unit testing framework as a runner for integration tests.