rdblue commented on code in PR #6977:
URL: https://github.com/apache/iceberg/pull/6977#discussion_r1125057764


##########
api/src/test/java/org/apache/iceberg/AssertHelpers.java:
##########
@@ -23,7 +23,22 @@
 import org.apache.avro.generic.GenericRecord;
 import org.assertj.core.api.AbstractThrowableAssert;
 import org.assertj.core.api.Assertions;
+import org.assertj.core.api.ThrowableAssert;
 
+/**
+ * This class is deprecated. Please use {@link
+ * Assertions#assertThatThrownBy(ThrowableAssert.ThrowingCallable)} directly 
as shown below:
+ *
+ * <pre>
+ * Assertions.assertThatThrownBy(() -> throwingCallable)
+ *    .isInstanceOf(ExpectedException.class)
+ *    .hasMessage(expectedErrorMsg)
+ * </pre>
+ *
+ * @deprecated Use {@link 
Assertions#assertThatThrownBy(ThrowableAssert.ThrowingCallable)} directly
+ *     as it provides a more fluent way of asserting on exceptions.

Review Comment:
   My only issue with this is making sure that `hasMessage` is called. How do 
we enforce that?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to