Search in sources :

Example 6 with EnumerablePropertySource

use of org.springframework.core.env.EnumerablePropertySource in project spring-framework by spring-projects.

the class InlinedPropertiesTestPropertySourceTests method propertyNameOrderingIsPreservedInEnvironment.

@Test
@SuppressWarnings("rawtypes")
public void propertyNameOrderingIsPreservedInEnvironment() {
    final String[] expectedPropertyNames = new String[] { "foo", "baz", "enigma", "x.y.z", "server.url", "key.value.1", "key.value.2", "key.value.3" };
    EnumerablePropertySource eps = (EnumerablePropertySource) env.getPropertySources().get(INLINED_PROPERTIES_PROPERTY_SOURCE_NAME);
    assertArrayEquals(expectedPropertyNames, eps.getPropertyNames());
}
Also used : EnumerablePropertySource(org.springframework.core.env.EnumerablePropertySource) Test(org.junit.Test)

Aggregations

EnumerablePropertySource (org.springframework.core.env.EnumerablePropertySource)6 Test (org.junit.Test)3 PropertySource (org.springframework.core.env.PropertySource)2 ByteArrayResource (org.springframework.core.io.ByteArrayResource)2 Environment (grails.util.Environment)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 Properties (java.util.Properties)1 DataConnector (net.shibboleth.idp.attribute.resolver.DataConnector)1 AttributeResolverImpl (net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl)1 CasConfigurationProperties (org.apereo.cas.configuration.CasConfigurationProperties)1 ShibbolethPersonAttributeDao (org.apereo.cas.persondir.support.ShibbolethPersonAttributeDao)1 PropertyPlaceholderConfigurer (org.springframework.beans.factory.config.PropertyPlaceholderConfigurer)1 EnableConfigurationProperties (org.springframework.boot.context.properties.EnableConfigurationProperties)1 ApplicationContext (org.springframework.context.ApplicationContext)1 Bean (org.springframework.context.annotation.Bean)1 CompositePropertySource (org.springframework.core.env.CompositePropertySource)1 PropertyResolver (org.springframework.core.env.PropertyResolver)1