use of org.springframework.core.env.PropertySources in project spring-boot by spring-projects.
the class PropertySourcesDeducerTests method getPropertySourcesWhenHasSinglePropertySourcesPlaceholderConfigurerReturnsBean.
@Test
void getPropertySourcesWhenHasSinglePropertySourcesPlaceholderConfigurerReturnsBean() {
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(PropertySourcesPlaceholderConfigurerConfiguration.class);
PropertySourcesDeducer deducer = new PropertySourcesDeducer(applicationContext);
PropertySources propertySources = deducer.getPropertySources();
assertThat(propertySources.get("test")).isInstanceOf(TestPropertySource.class);
}
Aggregations