|
1 | 1 | /* |
2 | | - * Copyright 2012-2019 the original author or authors. |
| 2 | + * Copyright 2012-2021 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
36 | 36 |
|
37 | 37 | import static org.assertj.core.api.Assertions.assertThat; |
38 | 38 | import static org.assertj.core.api.Assertions.assertThatExceptionOfType; |
| 39 | +import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; |
39 | 40 |
|
40 | 41 | /** |
41 | 42 | * Tests for {@link PersistenceExceptionTranslationAutoConfiguration} |
@@ -86,15 +87,12 @@ void exceptionTranslationPostProcessorCanBeDisabled() { |
86 | 87 | assertThat(beans).isEmpty(); |
87 | 88 | } |
88 | 89 |
|
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 | | - // } |
| 90 | + @Test |
| 91 | + void persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation() { |
| 92 | + this.context = new AnnotationConfigApplicationContext(EmbeddedDataSourceConfiguration.class, |
| 93 | + HibernateJpaAutoConfiguration.class, TestConfiguration.class); |
| 94 | + assertThatIllegalArgumentException().isThrownBy(() -> this.context.getBean(TestRepository.class).doSomething()); |
| 95 | + } |
98 | 96 |
|
99 | 97 | @Test |
100 | 98 | void persistOfNullThrowsInvalidDataAccessApiUsageExceptionWithExceptionTranslation() { |
|
0 commit comments