File tree Expand file tree Collapse file tree
errors/src/test/java/com/palantir/conjure/java/api/errors
test-utils/src/main/java/com/palantir/conjure/java/api/testing Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525public final class RemoteExceptionTest {
2626
27- @ SuppressWarnings ("for-rollout:deprecation" )
2827 @ Test
2928 public void testJavaSerialization () {
3029 // With explicit error instance
@@ -35,7 +34,7 @@ public void testJavaSerialization() {
3534 .build ();
3635 RemoteException expected = new RemoteException (error , 500 );
3736 RemoteException actual = SerializationUtils .deserialize (SerializationUtils .serialize (expected ));
38- assertThat (actual ).isEqualToComparingFieldByField (expected );
37+ assertThat (actual ).usingRecursiveComparison (). isEqualTo (expected );
3938
4039 // Without error instance
4140 error = new SerializableError .Builder ()
@@ -44,7 +43,7 @@ public void testJavaSerialization() {
4443 .build ();
4544 expected = new RemoteException (error , 500 );
4645 actual = SerializationUtils .deserialize (SerializationUtils .serialize (expected ));
47- assertThat (actual ).isEqualToComparingFieldByField (expected );
46+ assertThat (actual ).usingRecursiveComparison (). isEqualTo (expected );
4847 }
4948
5049 @ Test
Original file line number Diff line number Diff line change 1919import com .palantir .conjure .java .api .errors .QosException ;
2020import com .palantir .conjure .java .api .errors .RemoteException ;
2121import com .palantir .conjure .java .api .errors .ServiceException ;
22+ import org .assertj .core .annotation .CanIgnoreReturnValue ;
23+ import org .assertj .core .annotation .CheckReturnValue ;
2224import org .assertj .core .api .ThrowableAssert .ThrowingCallable ;
23- import org .assertj .core .util .CanIgnoreReturnValue ;
24- import org .assertj .core .util .CheckReturnValue ;
2525
26- @ SuppressWarnings ("for-rollout:deprecation" )
2726@ CheckReturnValue
2827public class Assertions extends org .assertj .core .api .Assertions {
2928
@@ -41,19 +40,16 @@ public static QosExceptionAssert assertThat(QosException actual) {
4140 return new QosExceptionAssert (actual );
4241 }
4342
44- @ SuppressWarnings ("for-rollout:deprecation" )
4543 @ CanIgnoreReturnValue
4644 public static ServiceExceptionAssert assertThatServiceExceptionThrownBy (ThrowingCallable shouldRaiseThrowable ) {
4745 return assertThatThrownBy (shouldRaiseThrowable ).asInstanceOf (ServiceExceptionAssert .instanceOfAssertFactory ());
4846 }
4947
50- @ SuppressWarnings ("for-rollout:deprecation" )
5148 @ CanIgnoreReturnValue
5249 public static RemoteExceptionAssert assertThatRemoteExceptionThrownBy (ThrowingCallable shouldRaiseThrowable ) {
5350 return assertThatThrownBy (shouldRaiseThrowable ).asInstanceOf (RemoteExceptionAssert .instanceOfAssertFactory ());
5451 }
5552
56- @ SuppressWarnings ("for-rollout:deprecation" )
5753 @ CanIgnoreReturnValue
5854 public static QosExceptionAssert assertThatQosExceptionThrownBy (ThrowingCallable shouldRaiseThrowable ) {
5955 return assertThatThrownBy (shouldRaiseThrowable ).asInstanceOf (QosExceptionAssert .instanceOfAssertFactory ());
You can’t perform that action at this time.
0 commit comments