What are exceptions in JUnit?
assertThrows method in JUnit is for handling expected exception on that particular Method . Here is the Syntax Exception exception = assertThrows(NumberFormatException.class, () → { Integer.parseInt(“1a”); });
What are exceptions in JUnit?
assertThrows method in JUnit is for handling expected exception on that particular Method . Here is the Syntax Exception exception = assertThrows(NumberFormatException.class, () → { Integer.parseInt(“1a”); });