java - How to get the Exception from a test target method if it's been caught -
i want expect target method cause exception
, target method has try-catch
block deal exception, can't exception in test method.
you have test target method , junit must according it.if in target method, exception being caught , processed junit test case must assert in no condition target method ends in exception.
check being done in catch block of target method , write junit check proper functioning of code in catch block.
Comments
Post a Comment