Codota Logo
SpringBootTestContextBootstrapper.createModifiedConfig
Code IndexAdd Codota to your IDE (free)

How to use
createModifiedConfig
method
in
org.springframework.boot.test.context.SpringBootTestContextBootstrapper

Best Java code snippets using org.springframework.boot.test.context.SpringBootTestContextBootstrapper.createModifiedConfig (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.springframework.boot/spring-boot-test

/**
 * Create a new {@link MergedContextConfiguration} with different classes.
 * @param mergedConfig the source config
 * @param classes the replacement classes
 * @return a new {@link MergedContextConfiguration}
 */
protected final MergedContextConfiguration createModifiedConfig(
    MergedContextConfiguration mergedConfig, Class<?>[] classes) {
  return createModifiedConfig(mergedConfig, classes,
      mergedConfig.getPropertySourceProperties());
}
origin: org.springframework.boot/spring-boot-test

@Override
protected MergedContextConfiguration processMergedContextConfiguration(
    MergedContextConfiguration mergedConfig) {
  Class<?>[] classes = getOrFindConfigurationClasses(mergedConfig);
  List<String> propertySourceProperties = getAndProcessPropertySourceProperties(
      mergedConfig);
  mergedConfig = createModifiedConfig(mergedConfig, classes,
      StringUtils.toStringArray(propertySourceProperties));
  WebEnvironment webEnvironment = getWebEnvironment(mergedConfig.getTestClass());
  if (webEnvironment != null && isWebEnvironmentSupported(mergedConfig)) {
    WebApplicationType webApplicationType = getWebApplicationType(mergedConfig);
    if (webApplicationType == WebApplicationType.SERVLET
        && (webEnvironment.isEmbedded()
            || webEnvironment == WebEnvironment.MOCK)) {
      WebAppConfiguration webAppConfiguration = AnnotatedElementUtils
          .findMergedAnnotation(mergedConfig.getTestClass(),
              WebAppConfiguration.class);
      String resourceBasePath = (webAppConfiguration != null)
          ? webAppConfiguration.value() : "src/main/webapp";
      mergedConfig = new WebMergedContextConfiguration(mergedConfig,
          resourceBasePath);
    }
    else if (webApplicationType == WebApplicationType.REACTIVE
        && (webEnvironment.isEmbedded()
            || webEnvironment == WebEnvironment.MOCK)) {
      return new ReactiveWebMergedContextConfiguration(mergedConfig);
    }
  }
  return mergedConfig;
}
org.springframework.boot.test.contextSpringBootTestContextBootstrappercreateModifiedConfig

Javadoc

Create a new MergedContextConfiguration with different classes.

Popular methods of SpringBootTestContextBootstrapper

  • <init>
  • addConfigAttributesClasses
  • buildMergedContextConfiguration
  • containsNonTestComponent
  • deduceWebApplicationType
  • getAndProcessPropertySourceProperties
  • getAnnotation
  • getCacheAwareContextLoaderDelegate
  • getClasses
  • getDifferentiatorPropertySourceProperty
    Return a "differentiator" property to ensure that there is something to differentiate regular tests
  • getOrFindConfigurationClasses
  • getProperties
  • getOrFindConfigurationClasses,
  • getProperties,
  • getWebApplicationType,
  • getWebEnvironment,
  • isFromConfiguration,
  • isWebEnvironmentSupported,
  • merge,
  • processMergedContextConfiguration,
  • processPropertySourceProperties

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now