Commit 661d46a
Fix CheckedRunnableTest#shouldApplyAnUncheckedFunctionThatThrows (#2956)
* `shouldApplyAnUncheckedFunctionThatThrows` always passed, when
removing the `throw new Error()` because the failed asserting was
immediately caught.
```java
final Runnable runnable = CheckedRunnable.of(() -> { /*throw new Error();*/ }).unchecked(); // Test would still pass
```
Fixed by using `assertThrows` from JUnit
----
backport of: #2954
Co-authored-by: Boris van Katwijk <bvkatwijk@gmail.com>1 parent 75250e3 commit 661d46a
1 file changed
+2
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 60 | + | |
66 | 61 | | |
67 | 62 | | |
0 commit comments