File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
test-utils/src/main/java/com/palantir/conjure/java/api/testing Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1+ type : fix
2+ fix :
3+ description : Annotate test-utils AssertJ Assertions with CheckReturnValue to match
4+ assertj-core.
5+ links :
6+ - https://github.com/palantir/conjure-java-runtime-api/pull/407
Original file line number Diff line number Diff line change 2121import org .assertj .core .api .AssertionsForClassTypes ;
2222import org .assertj .core .api .ThrowableAssert .ThrowingCallable ;
2323import org .assertj .core .internal .Failures ;
24+ import org .assertj .core .util .CanIgnoreReturnValue ;
25+ import org .assertj .core .util .CheckReturnValue ;
2426
27+ @ CheckReturnValue
2528public class Assertions extends org .assertj .core .api .Assertions {
2629
2730 Assertions () {}
@@ -34,12 +37,14 @@ public static RemoteExceptionAssert assertThat(RemoteException actual) {
3437 return new RemoteExceptionAssert (actual );
3538 }
3639
40+ @ CanIgnoreReturnValue
3741 public static ServiceExceptionAssert assertThatServiceExceptionThrownBy (ThrowingCallable shouldRaiseThrowable ) {
3842 Throwable throwable = AssertionsForClassTypes .catchThrowable (shouldRaiseThrowable );
3943 checkThrowableIsOfType (throwable , ServiceException .class );
4044 return new ServiceExceptionAssert ((ServiceException ) throwable );
4145 }
4246
47+ @ CanIgnoreReturnValue
4348 public static RemoteExceptionAssert assertThatRemoteExceptionThrownBy (ThrowingCallable shouldRaiseThrowable ) {
4449 Throwable throwable = AssertionsForClassTypes .catchThrowable (shouldRaiseThrowable );
4550 checkThrowableIsOfType (throwable , RemoteException .class );
You can’t perform that action at this time.
0 commit comments