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
@@ -96,7 +96,7 @@ class DefaultAuditableBeanWrapperFactoryUnitTests {
|
||||
|
||||
assertThat(wrapper).isNotEmpty();
|
||||
|
||||
assertThatExceptionOfType(IllegalArgumentException.class)
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> wrapper.ifPresent(it -> it.setLastModifiedDate(zonedDateTime)));
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class AuditingBeanDefinitionRegistrarSupportUnitTests {
|
||||
|
||||
AuditingBeanDefinitionRegistrarSupport registrar = new DummyAuditingBeanDefinitionRegistrarSupport();
|
||||
|
||||
assertThatExceptionOfType(IllegalArgumentException.class) //
|
||||
assertThatIllegalArgumentException() //
|
||||
.isThrownBy(() -> registrar.registerBeanDefinitions(null, registry));
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class AuditingBeanDefinitionRegistrarSupportUnitTests {
|
||||
AuditingBeanDefinitionRegistrarSupport registrar = new DummyAuditingBeanDefinitionRegistrarSupport();
|
||||
AnnotationMetadata metadata = new StandardAnnotationMetadata(SampleConfig.class);
|
||||
|
||||
assertThatExceptionOfType(IllegalArgumentException.class) //
|
||||
assertThatIllegalArgumentException() //
|
||||
.isThrownBy(() -> registrar.registerBeanDefinitions(metadata, null));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user