コード例 #1
0
 @Test
 public void throwing() {
   Verify.assertThrowsWithCause(
       RuntimeException.class,
       IOException.class,
       () ->
           Predicates.throwing(
                   e -> {
                     throw new IOException();
                   })
               .accept(null));
 }
コード例 #2
0
 @Test
 public void throwing() {
   Verify.assertThrowsWithCause(
       RuntimeException.class,
       IOException.class,
       () ->
           Functions2.throwing(
                   (a, b) -> {
                     throw new IOException();
                   })
               .value(null, null));
 }