Tabnine Logo
MergedContextConfiguration.getPropertySourceProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
getPropertySourceProperties
method
in
org.springframework.test.context.MergedContextConfiguration

Best Java code snippets using org.springframework.test.context.MergedContextConfiguration.getPropertySourceProperties (Showing top 8 results out of 315)

origin: spring-projects/spring-framework

context.getEnvironment().setActiveProfiles(mergedConfig.getActiveProfiles());
TestPropertySourceUtils.addPropertiesFilesToEnvironment(context, mergedConfig.getPropertySourceLocations());
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(context, mergedConfig.getPropertySourceProperties());
invokeApplicationContextInitializers(context, mergedConfig);
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

private List<String> getAndProcessPropertySourceProperties(
    MergedContextConfiguration mergedConfig) {
  List<String> propertySourceProperties = new ArrayList<>(
      Arrays.asList(mergedConfig.getPropertySourceProperties()));
  String differentiator = getDifferentiatorPropertySourceProperty();
  if (differentiator != null) {
    propertySourceProperties.add(differentiator);
  }
  processPropertySourceProperties(mergedConfig, propertySourceProperties);
  return propertySourceProperties;
}
origin: com.payu.ratel/ratel-test-utils

private void addPropertySourcePropertiesUsingReflection(TestContext testContext, String[] properties) {
 MergedContextConfiguration configuration = (MergedContextConfiguration) ReflectionTestUtils.getField(testContext,
   "mergedContextConfiguration");
 Set<String> merged = new LinkedHashSet<String>(Arrays.asList(configuration.getPropertySourceProperties()));
 merged.addAll(Arrays.asList(properties));
 addIntegrationTestProperty(merged);
 ReflectionTestUtils.setField(configuration, "propertySourceProperties", merged.toArray(new String[merged.size()]));
}
origin: org.springframework.boot/spring-boot-test

protected String[] getInlinedProperties(MergedContextConfiguration config) {
  ArrayList<String> properties = new ArrayList<>();
  // JMX bean names will clash if the same bean is used in multiple contexts
  disableJmx(properties);
  properties.addAll(Arrays.asList(config.getPropertySourceProperties()));
  if (!isEmbeddedWebEnvironment(config) && !hasCustomServerPort(properties)) {
    properties.add("server.port=-1");
  }
  return StringUtils.toStringArray(properties);
}
origin: org.springframework.boot/spring-boot-test

private WebApplicationType getWebApplicationType(
    MergedContextConfiguration configuration) {
  ConfigurationPropertySource source = new MapConfigurationPropertySource(
      TestPropertySourceUtils.convertInlinedPropertiesToMap(
          configuration.getPropertySourceProperties()));
  Binder binder = new Binder(source);
  return binder
      .bind("spring.main.web-application-type",
          Bindable.of(WebApplicationType.class))
      .orElseGet(this::deduceWebApplicationType);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-test

context.getEnvironment().setActiveProfiles(mergedConfig.getActiveProfiles());
TestPropertySourceUtils.addPropertiesFilesToEnvironment(context, mergedConfig.getPropertySourceLocations());
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(context, mergedConfig.getPropertySourceProperties());
invokeApplicationContextInitializers(context, mergedConfig);
origin: apache/servicemix-bundles

context.getEnvironment().setActiveProfiles(mergedConfig.getActiveProfiles());
TestPropertySourceUtils.addPropertiesFilesToEnvironment(context, mergedConfig.getPropertySourceLocations());
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(context, mergedConfig.getPropertySourceProperties());
invokeApplicationContextInitializers(context, mergedConfig);
org.springframework.test.contextMergedContextConfigurationgetPropertySourceProperties

Javadoc

Get the merged test PropertySource properties for the #getTestClass().

Properties will be loaded into the Environment's set of PropertySources.

Popular methods of MergedContextConfiguration

  • getLocations
    Get the merged resource locations for ApplicationContextconfiguration files for the #getTestClass().
  • getTestClass
    Get the Class associated with this MergedContextConfiguration.
  • getActiveProfiles
    Get the merged active bean definition profiles for the #getTestClass().
  • getClasses
    Get the merged annotated classes for the #getTestClass().
  • getContextLoader
    Get the resolved ContextLoader for the #getTestClass().
  • <init>
    Create a new MergedContextConfiguration instance by copying all fields from the supplied MergedConte
  • getParent
    Get the MergedContextConfiguration for the parent application context in a context hierarchy.
  • getParentApplicationContext
    Get the parent ApplicationContext for the context defined by this MergedContextConfiguration from th
  • getContextInitializerClasses
    Get the merged ApplicationContextInitializer classes for the #getTestClass().
  • hasLocations
    Determine if this MergedContextConfiguration instance has path-based context resource locations.
  • getContextCustomizers
    Get the merged ContextCustomizer that will be applied when the application context is loaded.
  • getPropertySourceLocations
    Get the merged resource locations for test PropertySourcesfor the #getTestClass().
  • getContextCustomizers,
  • getPropertySourceLocations,
  • hasClasses,
  • hashCode,
  • equals,
  • nullSafeClassName,
  • processActiveProfiles,
  • processClasses,
  • processContextCustomizers

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Runner (org.openjdk.jmh.runner)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now