888990919293949596
assertTrue(result.isPass()); assertFalse(result.isDescend()); } @Test public void combineFailStop() { Result result = Result.FAIL.combine(Result.STOP); assertFalse(result.isPass()); assertFalse(result.isDescend()); }
9596979899100101102103
assertFalse(result.isDescend()); } @Test public void negatePass() { Result result = Result.PASS.negate(); assertFalse(result.isPass()); assertTrue(result.isDescend()); }
102103104105106107108109110
assertTrue(result.isDescend()); } @Test public void negateFail() { Result result = Result.FAIL.negate(); assertTrue(result.isPass()); assertTrue(result.isDescend()); }
108109110111112113114115116
assertTrue(result.isPass()); assertTrue(result.isDescend()); } @Test public void negateStop() { Result result = Result.STOP.negate(); assertFalse(result.isPass()); assertFalse(result.isDescend()); }
114115116117118119120121122
assertFalse(result.isPass()); assertFalse(result.isDescend()); } @Test public void equalsPass() { Result one = Result.PASS; Result two = Result.PASS.combine(Result.PASS); assertEquals(one, two); }
120121122123124125126127128
Result two = Result.PASS.combine(Result.PASS); assertEquals(one, two); } @Test public void equalsFail() { Result one = Result.FAIL; Result two = Result.FAIL.combine(Result.FAIL); assertEquals(one, two); }
126127128129130131132133134
Result two = Result.FAIL.combine(Result.FAIL); assertEquals(one, two); } @Test public void equalsStop() { Result one = Result.STOP; Result two = Result.STOP.combine(Result.STOP); assertEquals(one, two); }
323334353637383940
@Test public void apply() throws IOException { Prune prune = new Prune(); PathData item = mock(PathData.class); Result result = prune.apply(item); assertTrue(result.isPass()); assertFalse(result.isDescend()); }