org.springframework.boot.test

Class EnvironmentTestUtils



  • public abstract class EnvironmentTestUtils
    extends Object
    Test utilities for setting environment values.
    Author:
    Dave Syer
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static void addEnvironment(org.springframework.context.ConfigurableApplicationContext context, String... pairs)
      Add additional (high priority) values to an Environment owned by an ApplicationContext.
      static void addEnvironment(org.springframework.core.env.ConfigurableEnvironment environment, String... pairs)
      Add additional (high priority) values to an Environment.
      static void addEnvironment(String name, org.springframework.core.env.ConfigurableEnvironment environment, String... pairs)
      Add additional (high priority) values to an Environment.
    • Constructor Detail

      • EnvironmentTestUtils

        public 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

Copyright © 2014 Pivotal Software, Inc.. All rights reserved.