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

@@ -78,7 +78,7 @@ class LazyUnitTests {
@Test
void rejectsNullValueLookup() {
assertThatExceptionOfType(IllegalStateException.class) //
assertThatIllegalStateException() //
.isThrownBy(() -> Lazy.of(() -> null).get());
}

View File

@@ -37,7 +37,7 @@ class MethodInvocationRecorderUnitTests {
@Test // DATACMNS-1449
void rejectsFinalTypes() {
assertThatExceptionOfType(IllegalArgumentException.class) //
assertThatIllegalArgumentException() //
.isThrownBy(() -> MethodInvocationRecorder.forProxyOf(FinalType.class));
}