Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TAKETODAY committed Feb 24, 2025
1 parent 9511ba0 commit b5df3ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions today-framework/src/test/java/infra/app/ApplicationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import infra.beans.CachedIntrospectionResults;
import infra.beans.factory.BeanCreationException;
import infra.beans.factory.BeanCurrentlyInCreationException;
import infra.beans.factory.BeanDefinitionStoreException;
import infra.beans.factory.ObjectProvider;
import infra.beans.factory.UnsatisfiedDependencyException;
import infra.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -115,6 +116,7 @@
import infra.mock.env.MockEnvironment;
import infra.test.classpath.ForkedClassPath;
import infra.test.context.support.TestPropertySourceUtils;
import infra.util.ExceptionUtils;
import infra.util.LinkedMultiValueMap;
import infra.util.MultiValueMap;
import infra.util.StringUtils;
Expand All @@ -131,6 +133,7 @@
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.assertj.core.api.Assertions.assertThatNoException;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
Expand Down Expand Up @@ -202,9 +205,10 @@ void sourcesMustNotBeEmpty() {

@Test
void sourcesMustBeAccessible() {
assertThatIllegalArgumentException()
.isThrownBy(() -> new Application(InaccessibleConfiguration.class).run())
.withMessageContaining("No visible constructors");
assertThatThrownBy(() -> new Application(InaccessibleConfiguration.class).run())
.isInstanceOf(BeanDefinitionStoreException.class)
.satisfies(ex -> assertThat(ExceptionUtils.getNestedMessage(ex, null))
.contains("No visible constructors"));
}

@Test
Expand Down

0 comments on commit b5df3ab

Please sign in to comment.