12
12
13
13
import static java .util .Arrays .asList ;
14
14
import static org .hamcrest .CoreMatchers .sameInstance ;
15
- import static org .junit .Assert .assertEquals ;
16
- import static org .junit .Assert .assertThat ;
15
+ import static org .junit .Assert .*;
17
16
import static org .mockito .Mockito .mock ;
18
17
import static org .mockito .Mockito .verify ;
19
18
import static org .mockito .Mockito .when ;
@@ -37,13 +36,15 @@ public void passed_failed_pending_undefined_skipped_is_failed() throws Exception
37
36
s .add (new Result (Result .Type .UNDEFINED , 0L , null ));
38
37
s .add (new Result (Result .Type .SKIPPED , 0L , null ));
39
38
assertEquals (Result .Type .FAILED , s .getStatus ());
39
+ assertTrue (s .isFailed ());
40
40
}
41
41
42
42
@ Test
43
43
public void passed_and_skipped_is_skipped_although_we_cant_have_skipped_without_undefined_or_pending () throws Exception {
44
44
s .add (new Result (Result .Type .PASSED , 0L , null ));
45
45
s .add (new Result (Result .Type .SKIPPED , 0L , null ));
46
46
assertEquals (Result .Type .SKIPPED , s .getStatus ());
47
+ assertFalse (s .isFailed ());
47
48
}
48
49
49
50
@ Test
@@ -53,6 +54,7 @@ public void passed_pending_undefined_skipped_is_pending() throws Exception {
53
54
s .add (new Result (Result .Type .PENDING , 0L , null ));
54
55
s .add (new Result (Result .Type .SKIPPED , 0L , null ));
55
56
assertEquals (Result .Type .UNDEFINED , s .getStatus ());
57
+ assertFalse (s .isFailed ());
56
58
}
57
59
58
60
@ Test
@@ -61,6 +63,7 @@ public void passed_undefined_skipped_is_undefined() throws Exception {
61
63
s .add (new Result (Result .Type .UNDEFINED , 0L , null ));
62
64
s .add (new Result (Result .Type .SKIPPED , 0L , null ));
63
65
assertEquals (Result .Type .UNDEFINED , s .getStatus ());
66
+ assertFalse (s .isFailed ());
64
67
}
65
68
66
69
@ Test
0 commit comments