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:
Phillip Webb
2020-06-09 11:29:32 -07:00
committed by Mark Paluch
parent 86bda64daa
commit 5734cfe878
28 changed files with 42 additions and 42 deletions

View File

@@ -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));
}
}

View File

@@ -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");