Skip to content

Commit 22456f7

Browse files
committed
Restore persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation()
1 parent 38cd1b4 commit 22456f7

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfigurationTests.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,13 @@ void exceptionTranslationPostProcessorCanBeDisabled() {
8686
assertThat(beans).isEmpty();
8787
}
8888

89-
// @Test
90-
// public void
91-
// persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation() {
92-
// this.context = new AnnotationConfigApplicationContext(
93-
// EmbeddedDataSourceConfiguration.class,
94-
// HibernateJpaAutoConfiguration.class, TestConfiguration.class);
95-
// assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(
96-
// () -> this.context.getBean(TestRepository.class).doSomething());
97-
// }
89+
@Test
90+
void persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation() {
91+
this.context = new AnnotationConfigApplicationContext(EmbeddedDataSourceConfiguration.class,
92+
HibernateJpaAutoConfiguration.class, TestConfiguration.class);
93+
assertThatExceptionOfType(IllegalArgumentException.class)
94+
.isThrownBy(() -> this.context.getBean(TestRepository.class).doSomething());
95+
}
9896

9997
@Test
10098
void persistOfNullThrowsInvalidDataAccessApiUsageExceptionWithExceptionTranslation() {

0 commit comments

Comments
 (0)