File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/test/java/com/pivovarit/function Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1717class ThrowingIntFunctionTest {
1818
1919 private static final String EXPECTED_MESSAGE = "Oh no! " + UUID .randomUUID ();
20+
2021 private static final ThrowingIntFunction <String , Exception > THROWS_CHECKED = i -> {
2122 throw new Exception (EXPECTED_MESSAGE );
2223 };
@@ -54,7 +55,7 @@ void shouldWrapInRuntimeEx() {
5455
5556 @ Test
5657 void shouldWrapInRuntimeExWhenUsingUnchecked () {
57- assertThatThrownBy (() -> IntStream .of (1 ).mapToObj (unchecked (THROWS_CHECKED )).count ())
58+ assertThatThrownBy (() -> IntStream .of (1 ).mapToObj (unchecked (THROWS_CHECKED )).toArray ())
5859 .isInstanceOf (WrappedException .class )
5960 .hasMessage (EXPECTED_MESSAGE )
6061 .hasCauseInstanceOf (Exception .class );
@@ -76,4 +77,4 @@ void shouldWrapInOptionalWhenUsingStandardUtilsFunctions() {
7677 assertThat (result ).isZero ();
7778 }
7879
79- }
80+ }
You can’t perform that action at this time.
0 commit comments