Class EnvironmentTestUtils

    • Method Detail

      • addEnvironment

        public static void addEnvironment​(org.springframework.context.ConfigurableApplicationContext context,
                                          String... pairs)
        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​(org.springframework.core.env.ConfigurableEnvironment environment,
                                          String... pairs)
        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,
                                          org.springframework.core.env.ConfigurableEnvironment environment,
                                          String... pairs)
        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