|
|
|
@ -46,14 +46,14 @@ class YamlMapFactoryBeanTests { |
|
|
|
@Test |
|
|
|
@Test |
|
|
|
void testSetIgnoreResourceNotFound() { |
|
|
|
void testSetIgnoreResourceNotFound() { |
|
|
|
this.factory.setResolutionMethod(YamlMapFactoryBean.ResolutionMethod.OVERRIDE_AND_IGNORE); |
|
|
|
this.factory.setResolutionMethod(YamlMapFactoryBean.ResolutionMethod.OVERRIDE_AND_IGNORE); |
|
|
|
this.factory.setResources(new FileSystemResource("non-exsitent-file.yml")); |
|
|
|
this.factory.setResources(new FileSystemResource("non-existent-file.yml")); |
|
|
|
assertThat(this.factory.getObject()).isEmpty(); |
|
|
|
assertThat(this.factory.getObject()).isEmpty(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
void testSetBarfOnResourceNotFound() { |
|
|
|
void testSetBarfOnResourceNotFound() { |
|
|
|
assertThatIllegalStateException().isThrownBy(() -> { |
|
|
|
assertThatIllegalStateException().isThrownBy(() -> { |
|
|
|
this.factory.setResources(new FileSystemResource("non-exsitent-file.yml")); |
|
|
|
this.factory.setResources(new FileSystemResource("non-existent-file.yml")); |
|
|
|
this.factory.getObject().size(); |
|
|
|
this.factory.getObject().size(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|