R
RC
For example
public void myMethod() {
try {
// do something;
} catch (IOException ioe) {
System.err.println(ioe);
}
}
I want to use Junit to test myMethod whether
it catches the Exception or not
In Junit I only know
assertTrue
assertEquals
assertNotNull
is there method called assertCatch ?
Thanks!
public void myMethod() {
try {
// do something;
} catch (IOException ioe) {
System.err.println(ioe);
}
}
I want to use Junit to test myMethod whether
it catches the Exception or not
In Junit I only know
assertTrue
assertEquals
assertNotNull
is there method called assertCatch ?
Thanks!