File tree 1 file changed +4
-1
lines changed
spring-boot-project/spring-boot/src/test/java/org/springframework/boot
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 46
46
import org .springframework .aot .AotDetector ;
47
47
import org .springframework .beans .factory .BeanCreationException ;
48
48
import org .springframework .beans .factory .BeanCurrentlyInCreationException ;
49
+ import org .springframework .beans .factory .BeanDefinitionStoreException ;
49
50
import org .springframework .beans .factory .ObjectProvider ;
50
51
import org .springframework .beans .factory .UnsatisfiedDependencyException ;
51
52
import org .springframework .beans .factory .annotation .Autowired ;
@@ -220,8 +221,10 @@ void sourcesMustNotBeEmpty() {
220
221
221
222
@ Test
222
223
void sourcesMustBeAccessible () {
223
- assertThatIllegalArgumentException ( )
224
+ assertThatExceptionOfType ( BeanDefinitionStoreException . class )
224
225
.isThrownBy (() -> new SpringApplication (InaccessibleConfiguration .class ).run ())
226
+ .havingRootCause ()
227
+ .isInstanceOf (IllegalArgumentException .class )
225
228
.withMessageContaining ("No visible constructors" );
226
229
}
227
230
You can’t perform that action at this time.
0 commit comments