Skip to content

Commit

Permalink
Polish assertion message on testWithCheckConfigLocationFileDoesNotExists
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuki43zoo committed Nov 24, 2024
1 parent 8f53a1c commit 8076037
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,8 @@ void testWithCheckConfigLocationFileNotSpecify() {
void testWithCheckConfigLocationFileDoesNotExists() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("mybatis.config-location:foo.xml", "mybatis.check-config-location=true")
.run(context -> assertThat(context).getFailure().isInstanceOf(BeanCreationException.class)
.hasMessageContainingAll(
"Error creating bean with name 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration':",
"Cannot find config location: class path resource [foo.xml] (please add config file or check your Mybatis configuration)"));
.run(context -> assertThat(context).getFailure().isInstanceOf(BeanCreationException.class).hasMessageContaining(
"Cannot find config location: class path resource [foo.xml] (please add config file or check your Mybatis configuration)"));
}

@Test
Expand Down

0 comments on commit 8076037

Please sign in to comment.