Skip to content

Commit 3813941

Browse files
authored
Merge pull request #1031 from kazuki43zoo/gh-1020_polish
Polish assertion message on testWithCheckConfigLocationFileDoesNotExists
2 parents 8f53a1c + 8076037 commit 3813941

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mybatis-spring-boot-autoconfigure/src/test/java/org/mybatis/spring/boot/autoconfigure/MybatisAutoConfigurationTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,8 @@ void testWithCheckConfigLocationFileNotSpecify() {
307307
void testWithCheckConfigLocationFileDoesNotExists() {
308308
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
309309
.withPropertyValues("mybatis.config-location:foo.xml", "mybatis.check-config-location=true")
310-
.run(context -> assertThat(context).getFailure().isInstanceOf(BeanCreationException.class)
311-
.hasMessageContainingAll(
312-
"Error creating bean with name 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration':",
313-
"Cannot find config location: class path resource [foo.xml] (please add config file or check your Mybatis configuration)"));
310+
.run(context -> assertThat(context).getFailure().isInstanceOf(BeanCreationException.class).hasMessageContaining(
311+
"Cannot find config location: class path resource [foo.xml] (please add config file or check your Mybatis configuration)"));
314312
}
315313

316314
@Test

0 commit comments

Comments
 (0)