Junit5, Mockito for catch block for tidyJsonItemWriter.dump | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Nikhil-Kumar
Nikhil-KumarAccepted solution
New Participant
Aug 24, 2020 12:18 PM UTC

@anilc27140375 
Please have a look into below link, it's not exact the same thing. But it might help.
https://www.codejava.net/testing/junit-test-exception-examples-how-to-assert-an-exception-is-thrown

Thanks,
Nikhil

2 replies

Vijayalakshmi_S
Level 10
Aug 25, 2020 1:20 PM UTC

Hi @anilc27140375,

Can you let know if you are printing log message or any logic is handled in catch block for JSONException, RepositoryException and/or ValueFormatException part of dump method

Translate
Nikhil-Kumar
Nikhil-KumarAccepted solution
New Participant
Aug 24, 2020 12:18 PM UTC

@anilc27140375 
Please have a look into below link, it's not exact the same thing. But it might help.
https://www.codejava.net/testing/junit-test-exception-examples-how-to-assert-an-exception-is-thrown

Thanks,
Nikhil

Translate