Below code failed to report an error:
@Test
public void test() {
int a = 12;
int b =20;
try {
assertEquals(a, b);
}catch(Throwable t){
}
The code ran successfully and did not report any error. However, it was suppose to report an error as a!=b . If I don't use try catch block then it did report an error. Don't know why assertion is not working in try catch block. Any help will be appreciated. Thanks