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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -