Skip to content

Commit

Permalink
Merge pull request #1031 from kazuki43zoo/gh-1020_polish
Browse files Browse the repository at this point in the history
Polish assertion message on testWithCheckConfigLocationFileDoesNotExists
  • Loading branch information
kazuki43zoo authored Nov 24, 2024
2 parents 8f53a1c + 8076037 commit 3813941
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 3813941

Please sign in to comment.