Examples of precedenceOf()


Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    SimpleNamingContextBuilder.emptyActivatedContextBuilder();

    ConfigurableEnvironment env = new StandardServletEnvironment();
    MutablePropertySources sources = env.getPropertySources();

    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)), equalTo(0));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)), equalTo(1));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.JNDI_PROPERTY_SOURCE_NAME)), equalTo(2));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)), equalTo(3));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME)), equalTo(4));
    assertThat(sources.size(), is(5));
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    ConfigurableEnvironment env = new StandardServletEnvironment();
    MutablePropertySources sources = env.getPropertySources();

    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)), equalTo(0));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)), equalTo(1));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.JNDI_PROPERTY_SOURCE_NAME)), equalTo(2));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)), equalTo(3));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME)), equalTo(4));
    assertThat(sources.size(), is(5));
  }
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    ConfigurableEnvironment env = new StandardServletEnvironment();
    MutablePropertySources sources = env.getPropertySources();

    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)), equalTo(0));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)), equalTo(1));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.JNDI_PROPERTY_SOURCE_NAME)), equalTo(2));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)), equalTo(3));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME)), equalTo(4));
    assertThat(sources.size(), is(5));
  }
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    MutablePropertySources sources = env.getPropertySources();

    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)), equalTo(0));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)), equalTo(1));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.JNDI_PROPERTY_SOURCE_NAME)), equalTo(2));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)), equalTo(3));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME)), equalTo(4));
    assertThat(sources.size(), is(5));
  }

}
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONFIG_PROPERTY_SOURCE_NAME)), equalTo(0));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME)), equalTo(1));
    assertThat(sources.precedenceOf(PropertySource.named(StandardServletEnvironment.JNDI_PROPERTY_SOURCE_NAME)), equalTo(2));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME)), equalTo(3));
    assertThat(sources.precedenceOf(PropertySource.named(StandardEnvironment.SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME)), equalTo(4));
    assertThat(sources.size(), is(5));
  }

}
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    sources.addBefore("b", new MockPropertySource("a"));
    sources.addAfter("b", new MockPropertySource("c"));

    assertThat(sources.size(), equalTo(5));
    assertThat(sources.precedenceOf(PropertySource.named("a")), is(0));
    assertThat(sources.precedenceOf(PropertySource.named("b")), is(1));
    assertThat(sources.precedenceOf(PropertySource.named("c")), is(2));
    assertThat(sources.precedenceOf(PropertySource.named("d")), is(3));
    assertThat(sources.precedenceOf(PropertySource.named("f")), is(4));
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    sources.addBefore("b", new MockPropertySource("a"));
    sources.addAfter("b", new MockPropertySource("c"));

    assertThat(sources.size(), equalTo(5));
    assertThat(sources.precedenceOf(PropertySource.named("a")), is(0));
    assertThat(sources.precedenceOf(PropertySource.named("b")), is(1));
    assertThat(sources.precedenceOf(PropertySource.named("c")), is(2));
    assertThat(sources.precedenceOf(PropertySource.named("d")), is(3));
    assertThat(sources.precedenceOf(PropertySource.named("f")), is(4));

    sources.addBefore("f", new MockPropertySource("e"));
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    sources.addAfter("b", new MockPropertySource("c"));

    assertThat(sources.size(), equalTo(5));
    assertThat(sources.precedenceOf(PropertySource.named("a")), is(0));
    assertThat(sources.precedenceOf(PropertySource.named("b")), is(1));
    assertThat(sources.precedenceOf(PropertySource.named("c")), is(2));
    assertThat(sources.precedenceOf(PropertySource.named("d")), is(3));
    assertThat(sources.precedenceOf(PropertySource.named("f")), is(4));

    sources.addBefore("f", new MockPropertySource("e"));
    sources.addAfter("f", new MockPropertySource("g"));
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    assertThat(sources.size(), equalTo(5));
    assertThat(sources.precedenceOf(PropertySource.named("a")), is(0));
    assertThat(sources.precedenceOf(PropertySource.named("b")), is(1));
    assertThat(sources.precedenceOf(PropertySource.named("c")), is(2));
    assertThat(sources.precedenceOf(PropertySource.named("d")), is(3));
    assertThat(sources.precedenceOf(PropertySource.named("f")), is(4));

    sources.addBefore("f", new MockPropertySource("e"));
    sources.addAfter("f", new MockPropertySource("g"));
View Full Code Here

Examples of org.springframework.core.env.MutablePropertySources.precedenceOf()

    assertThat(sources.size(), equalTo(5));
    assertThat(sources.precedenceOf(PropertySource.named("a")), is(0));
    assertThat(sources.precedenceOf(PropertySource.named("b")), is(1));
    assertThat(sources.precedenceOf(PropertySource.named("c")), is(2));
    assertThat(sources.precedenceOf(PropertySource.named("d")), is(3));
    assertThat(sources.precedenceOf(PropertySource.named("f")), is(4));

    sources.addBefore("f", new MockPropertySource("e"));
    sources.addAfter("f", new MockPropertySource("g"));

    assertThat(sources.size(), equalTo(7));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.