You need to sign in to do that
Don't have an account?
Nandini
how to write test class for custom exception ?
Hi Team,
How to write test class for custom exception class ?
Thanks,
Nandu
How to write test class for custom exception class ?
public class CustomException extends Exception { boolean escape ; String errMsg ; public CustomException(String errMsg, boolean escape){ this.errMsg = errMsg; this.escape = escape; } public void addError(String errMsg, boolean escape){ } }Please let me know.
Thanks,
Nandu
May I suggest you please check with below link from the stack exchange community with a similar issue.
- https://salesforce.stackexchange.com/questions/177560/how-to-cover-custom-exception-class-with-tests
Please let us know if this helps.Thanks,
Nagendra