- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Looks to me like this will fail if any exception is thrown by "centralizedLogger.logAround(joinPoint);"
Admin
One would hope that an uncaught exception would fail the test no matter what BS is or isn't asserted down the line.
Edit Admin
Perhaps that's entirely the point. Yes, it's 137% totally obscure, especially without comments, but ...
Edit Admin
It is possible that my short tenure at a major financial firm was due to me informing my manager that although our "code coverage" was over 90% there were no assert statements.
Edit Admin
Cobra effect. Anything you require, no matter how stupid, will be accomplished in the easiest possible way.
Edit Admin
Bonus points for annotating the instance variable centralizedLogger with @InjectMocks - it won't mock anything since there is no other mocked instance injected - and then just overwriting that same variable in the method with a new ContralizedLogger instance.