Skip to content

Commit

Permalink
Adapt to change in exception hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Feb 27, 2025
1 parent a9615f9 commit facda3d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.springframework.aot.AotDetector;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.BeanCurrentlyInCreationException;
import org.springframework.beans.factory.BeanDefinitionStoreException;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.UnsatisfiedDependencyException;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -220,8 +221,10 @@ void sourcesMustNotBeEmpty() {

@Test
void sourcesMustBeAccessible() {
assertThatIllegalArgumentException()
assertThatExceptionOfType(BeanDefinitionStoreException.class)
.isThrownBy(() -> new SpringApplication(InaccessibleConfiguration.class).run())
.havingRootCause()
.isInstanceOf(IllegalArgumentException.class)
.withMessageContaining("No visible constructors");
}

Expand Down

0 comments on commit facda3d

Please sign in to comment.