org.springframework.test.context

Class MergedContextConfiguration

  • java.lang.Object
    • org.springframework.test.context.MergedContextConfiguration
    • Constructor Detail

      • MergedContextConfiguration

        public MergedContextConfiguration(java.lang.Class<?> testClass,
                                          java.lang.String[] locations,
                                          java.lang.Class<?>[] classes,
                                          java.lang.String[] activeProfiles,
                                          ContextLoader contextLoader)
        Create a new MergedContextConfiguration instance for the supplied parameters.
        Parameters:
        testClass - the test class for which the configuration was merged
        locations - the merged context resource locations
        classes - the merged annotated classes
        activeProfiles - the merged active bean definition profiles
        contextLoader - the resolved ContextLoader
      • MergedContextConfiguration

        public MergedContextConfiguration(java.lang.Class<?> testClass,
                                          java.lang.String[] locations,
                                          java.lang.Class<?>[] classes,
                                          @Nullable
                                          java.util.Set<java.lang.Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses,
                                          java.lang.String[] activeProfiles,
                                          ContextLoader contextLoader)
        Create a new MergedContextConfiguration instance for the supplied parameters.
        Parameters:
        testClass - the test class for which the configuration was merged
        locations - the merged context resource locations
        classes - the merged annotated classes
        contextInitializerClasses - the merged context initializer classes
        activeProfiles - the merged active bean definition profiles
        contextLoader - the resolved ContextLoader
      • MergedContextConfiguration

        public MergedContextConfiguration(java.lang.Class<?> testClass,
                                          java.lang.String[] locations,
                                          java.lang.Class<?>[] classes,
                                          @Nullable
                                          java.util.Set<java.lang.Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses,
                                          java.lang.String[] activeProfiles,
                                          ContextLoader contextLoader,
                                          @Nullable
                                          CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate,
                                          @Nullable
                                          MergedContextConfiguration parent)
        Create a new MergedContextConfiguration instance for the supplied parameters.
        Parameters:
        testClass - the test class for which the configuration was merged
        locations - the merged context resource locations
        classes - the merged annotated classes
        contextInitializerClasses - the merged context initializer classes
        activeProfiles - the merged active bean definition profiles
        contextLoader - the resolved ContextLoader
        cacheAwareContextLoaderDelegate - a cache-aware context loader delegate with which to retrieve the parent context
        parent - the parent configuration or null if there is no parent
        Since:
        3.2.2
      • MergedContextConfiguration

        public MergedContextConfiguration(MergedContextConfiguration mergedConfig)
        Create a new MergedContextConfiguration instance by copying all fields from the supplied MergedContextConfiguration.
        Since:
        4.1
      • MergedContextConfiguration

        public MergedContextConfiguration(java.lang.Class<?> testClass,
                                          @Nullable
                                          java.lang.String[] locations,
                                          @Nullable
                                          java.lang.Class<?>[] classes,
                                          @Nullable
                                          java.util.Set<java.lang.Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses,
                                          @Nullable
                                          java.lang.String[] activeProfiles,
                                          @Nullable
                                          java.lang.String[] propertySourceLocations,
                                          @Nullable
                                          java.lang.String[] propertySourceProperties,
                                          ContextLoader contextLoader,
                                          @Nullable
                                          CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate,
                                          @Nullable
                                          MergedContextConfiguration parent)
        Create a new MergedContextConfiguration instance for the supplied parameters.

        If a null value is supplied for locations, classes, activeProfiles, propertySourceLocations, or propertySourceProperties an empty array will be stored instead. If a null value is supplied for the contextInitializerClasses an empty set will be stored instead. Furthermore, active profiles will be sorted, and duplicate profiles will be removed.

        Parameters:
        testClass - the test class for which the configuration was merged
        locations - the merged context resource locations
        classes - the merged annotated classes
        contextInitializerClasses - the merged context initializer classes
        activeProfiles - the merged active bean definition profiles
        propertySourceLocations - the merged PropertySource locations
        propertySourceProperties - the merged PropertySource properties
        contextLoader - the resolved ContextLoader
        cacheAwareContextLoaderDelegate - a cache-aware context loader delegate with which to retrieve the parent context
        parent - the parent configuration or null if there is no parent
        Since:
        4.1
      • MergedContextConfiguration

        public MergedContextConfiguration(java.lang.Class<?> testClass,
                                          @Nullable
                                          java.lang.String[] locations,
                                          @Nullable
                                          java.lang.Class<?>[] classes,
                                          @Nullable
                                          java.util.Set<java.lang.Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses,
                                          @Nullable
                                          java.lang.String[] activeProfiles,
                                          @Nullable
                                          java.lang.String[] propertySourceLocations,
                                          @Nullable
                                          java.lang.String[] propertySourceProperties,
                                          @Nullable
                                          java.util.Set<ContextCustomizer> contextCustomizers,
                                          ContextLoader contextLoader,
                                          @Nullable
                                          CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate,
                                          @Nullable
                                          MergedContextConfiguration parent)
        Create a new MergedContextConfiguration instance for the supplied parameters.

        If a null value is supplied for locations, classes, activeProfiles, propertySourceLocations, or propertySourceProperties an empty array will be stored instead. If a null value is supplied for contextInitializerClasses or contextCustomizers, an empty set will be stored instead. Furthermore, active profiles will be sorted, and duplicate profiles will be removed.

        Parameters:
        testClass - the test class for which the configuration was merged
        locations - the merged context resource locations
        classes - the merged annotated classes
        contextInitializerClasses - the merged context initializer classes
        activeProfiles - the merged active bean definition profiles
        propertySourceLocations - the merged PropertySource locations
        propertySourceProperties - the merged PropertySource properties
        contextCustomizers - the context customizers
        contextLoader - the resolved ContextLoader
        cacheAwareContextLoaderDelegate - a cache-aware context loader delegate with which to retrieve the parent context
        parent - the parent configuration or null if there is no parent
        Since:
        4.3