java - How to make a Junit test case fail if there is any exception in the code? -


i wrote junit test unit test code. want junit test case fail when exception in code. tried using assert statement, when exception in code, junit test case passing. please can tell me how can achieve this? thanks.

you can assert global variable "excepted" = null or , initialize equal information string in catch block.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -