3 ms·
I think it's just a poor example to illustrate the point. Firstly this is most useful when it's @Test(expected=SomeDomainSpecificException.class) NPEs can be t
by benjiweber 14y ago
I think it's just a poor example to illustrate the point.
Firstly this is most useful when it's @Test(expected=SomeDomainSpecificException.class) NPEs can be thrown by anything.
Secondly, if you're following the other advice and have tests that test only one thing and assert only one thing then there should be only one line that can throw an Exception.