@Test public void testCheckedDoubleToLongFunction() { DoubleToLongFunction test = Unchecked.doubleToLongFunction( d -> { throw new Exception("" + d); }); assertDoubleToLongFunction(test, RuntimeException.class); }
@Test public void testCheckedToLongFunction() { ToLongFunction<Object> test = Unchecked.toLongFunction( t -> { throw new Exception("" + t); }); assertToLongFunction(test, RuntimeException.class); }
@Test public void testCheckedFunction() { Function<Object, Object> test = Unchecked.function( t -> { throw new Exception("" + t); }); assertFunction(test, RuntimeException.class); }
@Test public void testCheckedLongToDoubleFunction() { LongToDoubleFunction test = Unchecked.longToDoubleFunction( l -> { throw new Exception("" + l); }); assertLongToDoubleFunction(test, RuntimeException.class); }
@Test public void testCheckedIntToDoubleFunction() { IntToDoubleFunction test = Unchecked.intToDoubleFunction( i -> { throw new Exception("" + i); }); assertIntToDoubleFunction(test, RuntimeException.class); }
@Test public void testCheckedToIntFunctionWithCustomHandler() { ToIntFunction<Object> test = Unchecked.toIntFunction( t -> { throw new Exception("" + t); }, e -> { throw new IllegalStateException(e); }); assertToIntFunction(test, IllegalStateException.class); }
@Test public void testCheckedDoubleToLongFunctionWithCustomHandler() { DoubleToLongFunction test = Unchecked.doubleToLongFunction( d -> { throw new Exception("" + d); }, e -> { throw new IllegalStateException(e); }); assertDoubleToLongFunction(test, IllegalStateException.class); }
@Test public void testCheckedLongToDoubleFunctionWithCustomHandler() { LongToDoubleFunction test = Unchecked.longToDoubleFunction( l -> { throw new Exception("" + l); }, e -> { throw new IllegalStateException(e); }); assertLongToDoubleFunction(test, IllegalStateException.class); }
@Test public void testCheckedIntToDoubleFunctionWithCustomHandler() { IntToDoubleFunction test = Unchecked.intToDoubleFunction( i -> { throw new Exception("" + i); }, e -> { throw new IllegalStateException(e); }); assertIntToDoubleFunction(test, IllegalStateException.class); }