First
Look at the following test code:
The result is:
@Test
public void quiz1() throws Exception {
assertEquals(9, 01 + 08);
}
1) green bar
2) red bar
3) doesn't compile
4) it throws an exception
Second
@Test
public void quiz2() throws Exception {
Integer x = 1288;
Integer y = 1288;
assertTrue(x == y);
int z = 1288;
assertTrue(x == z);
}
1) first assert red, second green
2) green, red
3) green, green
4) red, red
5) doesn't compile
6) it throws an exception
2 commenti:
nel secondo la risposta dipenda dalla versione di JAVA
AFAIK if the first assert fails we actually should never reach the second assert...
Posta un commento