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
Post a Comment