You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please add a shortcut for extracting(Throwable::getMessage, as(InstanceOfAssertFactories.STRING)) to perform assertions on an exception's message (discussed in #2376 (comment)).
Example
Instead of
assertThatThrownBy(() -> {
/* code to test */
})
.isInstanceOf(CertPathValidatorException.class)
.extracting(Throwable::getMessage, as(InstanceOfAssertFactories.STRING))
.containsAnyOf(
"could not be determined",
"could not determine revocation status",
"revocation status check failed"
);
one can then use
assertThatThrownBy(() -> {
/* code to test */
})
.isInstanceOf(CertPathValidatorException.class)
.message()
.containsAnyOf(
"could not be determined",
"could not determine revocation status",
"revocation status check failed"
);
The text was updated successfully, but these errors were encountered:
Summary
Please add a shortcut for
extracting(Throwable::getMessage, as(InstanceOfAssertFactories.STRING))
to perform assertions on an exception's message (discussed in #2376 (comment)).Example
Instead of
one can then use
The text was updated successfully, but these errors were encountered: