DATACMNS-1755 - Use specialized assertThat*Exception.
When possible replace `assertThatExceptionOfType` calls with the equivalent specialized variant. Original pull request: #448.
This commit is contained in:
committed by
Mark Paluch
parent
86bda64daa
commit
5734cfe878
@@ -57,7 +57,7 @@ public class QPageRequestUnitTests extends AbstractPageRequestUnitTests {
|
||||
@Test // DATACMNS-1581
|
||||
void rejectsNullSort() {
|
||||
|
||||
assertThatExceptionOfType(IllegalArgumentException.class) //
|
||||
assertThatIllegalArgumentException() //
|
||||
.isThrownBy(() -> QPageRequest.of(0, 10, (QSort) null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class QuerydslBindingsFactoryUnitTests {
|
||||
@Test // DATACMNS-669
|
||||
void rejectsPredicateResolutionIfDomainTypeCantBeAutoDetected() {
|
||||
|
||||
assertThatExceptionOfType(IllegalStateException.class)//
|
||||
assertThatIllegalStateException()//
|
||||
.isThrownBy(() -> factory.createBindingsFor(ClassTypeInformation.from(ModelAndView.class)))//
|
||||
.withMessageContaining(QuerydslPredicate.class.getSimpleName())//
|
||||
.withMessageContaining("root");
|
||||
|
||||
Reference in New Issue
Block a user