org.springframework.boot.test.util

Class EnvironmentTestUtils


  • Deprecated. 
    since 2.0.0 in favor of TestPropertyValues

    @Deprecated
    public abstract class EnvironmentTestUtils
    extends Object
    Test utilities for setting environment values.
    Since:
    1.4.0
    Author:
    Dave Syer, Stephane Nicoll
    • Constructor Detail

      • EnvironmentTestUtils

        public EnvironmentTestUtils()
        Deprecated. 
    • Method Detail

      • addEnvironment

        public static void addEnvironment(ConfigurableApplicationContext context,
                                          String... pairs)
        Deprecated. 
        Add additional (high priority) values to an Environment owned by an ApplicationContext. Name-value pairs can be specified with colon (":") or equals ("=") separators.
        Parameters:
        context - the context with an environment to modify
        pairs - the name:value pairs
      • addEnvironment

        public static void addEnvironment(ConfigurableEnvironment environment,
                                          String... pairs)
        Deprecated. 
        Add additional (high priority) values to an Environment. Name-value pairs can be specified with colon (":") or equals ("=") separators.
        Parameters:
        environment - the environment to modify
        pairs - the name:value pairs
      • addEnvironment

        public static void addEnvironment(String name,
                                          ConfigurableEnvironment environment,
                                          String... pairs)
        Deprecated. 
        Add additional (high priority) values to an Environment. Name-value pairs can be specified with colon (":") or equals ("=") separators.
        Parameters:
        environment - the environment to modify
        name - the property source name
        pairs - the name:value pairs