Restore persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation()

See gh-24866
pull/24946/head
izeye 4 years ago committed by Stephane Nicoll
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…
Cancel
Save