Restore persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation()
See gh-24866
This commit is contained in:
parent
7493632b79
commit
41fcc427c6
|
|
@ -36,6 +36,7 @@ import org.springframework.stereotype.Repository;
|
|||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Tests for {@link PersistenceExceptionTranslationAutoConfiguration}
|
||||
|
|
@ -86,15 +87,12 @@ class PersistenceExceptionTranslationAutoConfigurationTests {
|
|||
assertThat(beans).isEmpty();
|
||||
}
|
||||
|
||||
// @Test
|
||||
// public void
|
||||
// persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation() {
|
||||
// this.context = new AnnotationConfigApplicationContext(
|
||||
// EmbeddedDataSourceConfiguration.class,
|
||||
// HibernateJpaAutoConfiguration.class, TestConfiguration.class);
|
||||
// assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(
|
||||
// () -> this.context.getBean(TestRepository.class).doSomething());
|
||||
// }
|
||||
@Test
|
||||
void persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation() {
|
||||
this.context = new AnnotationConfigApplicationContext(EmbeddedDataSourceConfiguration.class,
|
||||
HibernateJpaAutoConfiguration.class, TestConfiguration.class);
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.context.getBean(TestRepository.class).doSomething());
|
||||
}
|
||||
|
||||
@Test
|
||||
void persistOfNullThrowsInvalidDataAccessApiUsageExceptionWithExceptionTranslation() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue