Uses of Interface
org.springframework.test.context.ContextLoader
Packages that use ContextLoader Package Description org.springframework.test.context This package contains the Spring TestContext Framework which provides annotation-driven unit and integration testing support that is agnostic of the actual testing framework in use.org.springframework.test.context.support Support classes for the Spring TestContext Framework.org.springframework.test.context.web Web support classes for the Spring TestContext Framework.Uses of ContextLoader in org.springframework.test.context
Subinterfaces of ContextLoader in org.springframework.test.context Modifier and Type Interface Description interfaceSmartContextLoaderStrategy interface for loading anapplication contextfor an integration test managed by the Spring TestContext Framework.Methods in org.springframework.test.context that return ContextLoader Modifier and Type Method Description ContextLoaderMergedContextConfiguration. getContextLoader()Get the resolvedContextLoaderfor the test class.Methods in org.springframework.test.context that return types with arguments of type ContextLoader Modifier and Type Method Description Class<? extends ContextLoader>ContextConfigurationAttributes. getContextLoaderClass()Get theContextLoaderclass that was declared via@ContextConfiguration.Class<? extends ContextLoader>loader()Methods in org.springframework.test.context with parameters of type ContextLoader Modifier and Type Method Description protected static StringMergedContextConfiguration. nullSafeClassName(ContextLoader contextLoader)Generate a null-safeStringrepresentation of the suppliedContextLoaderbased solely on the fully qualified name of the loader or "null" if the supplied loader isnull.Constructors in org.springframework.test.context with parameters of type ContextLoader Constructor Description MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, String[] activeProfiles, ContextLoader contextLoader)Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader)Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)Create a newMergedContextConfigurationinstance for the supplied parameters.Uses of ContextLoader in org.springframework.test.context.support
Classes in org.springframework.test.context.support that implement ContextLoader Modifier and Type Class Description classAbstractContextLoaderAbstract application context loader that provides a basis for all concrete implementations of theContextLoaderSPI.classAbstractDelegatingSmartContextLoaderAbstractDelegatingSmartContextLoaderserves as an abstract base class for implementations of theSmartContextLoaderSPI that delegate to a set of candidate SmartContextLoaders (i.e., one that supports XML configuration files or Groovy scripts and one that supports annotated classes) to determine which context loader is appropriate for a given test class's configuration.classAbstractGenericContextLoaderAbstract, generic extension ofAbstractContextLoaderthat loads aGenericApplicationContext.classAnnotationConfigContextLoaderConcrete implementation ofAbstractGenericContextLoaderthat loads bean definitions from component classes.classDelegatingSmartContextLoaderDelegatingSmartContextLoaderis a concrete implementation ofAbstractDelegatingSmartContextLoaderthat delegates to aGenericXmlContextLoader(or aGenericGroovyXmlContextLoaderif Groovy is present in the classpath) and anAnnotationConfigContextLoader.classGenericGroovyXmlContextLoaderConcrete implementation ofAbstractGenericContextLoaderthat reads bean definitions from Groovy scripts and XML configuration files.classGenericPropertiesContextLoaderConcrete implementation ofAbstractGenericContextLoaderthat reads bean definitions from JavaPropertiesresources.classGenericXmlContextLoaderConcrete implementation ofAbstractGenericContextLoaderthat reads bean definitions from XML resources.Methods in org.springframework.test.context.support that return ContextLoader Modifier and Type Method Description protected ContextLoaderAbstractTestContextBootstrapper. resolveContextLoader(Class<?> testClass, List<ContextConfigurationAttributes> configAttributesList)Resolve theContextLoaderclass to use for the supplied list ofContextConfigurationAttributesand then instantiate and return thatContextLoader.Methods in org.springframework.test.context.support that return types with arguments of type ContextLoader Modifier and Type Method Description protected abstract Class<? extends ContextLoader>AbstractTestContextBootstrapper. getDefaultContextLoaderClass(Class<?> testClass)Determine the defaultContextLoaderclass to use for the supplied test class.protected Class<? extends ContextLoader>DefaultTestContextBootstrapper. getDefaultContextLoaderClass(Class<?> testClass)ReturnsDelegatingSmartContextLoader.protected Class<? extends ContextLoader>AbstractTestContextBootstrapper. resolveExplicitContextLoaderClass(List<ContextConfigurationAttributes> configAttributesList)Uses of ContextLoader in org.springframework.test.context.web
Classes in org.springframework.test.context.web that implement ContextLoader Modifier and Type Class Description classAbstractGenericWebContextLoaderAbstract, generic extension ofAbstractContextLoaderthat loads aGenericWebApplicationContext.classAnnotationConfigWebContextLoaderConcrete implementation ofAbstractGenericWebContextLoaderthat loads bean definitions from annotated classes.classGenericGroovyXmlWebContextLoaderConcrete implementation ofAbstractGenericWebContextLoaderthat loads bean definitions from Groovy scripts and XML configuration files.classGenericXmlWebContextLoaderConcrete implementation ofAbstractGenericWebContextLoaderthat loads bean definitions from XML resources.classWebDelegatingSmartContextLoaderWebDelegatingSmartContextLoaderis a concrete implementation ofAbstractDelegatingSmartContextLoaderthat delegates to aGenericXmlWebContextLoader(or aGenericGroovyXmlWebContextLoaderif Groovy is present on the classpath) and anAnnotationConfigWebContextLoader.Methods in org.springframework.test.context.web that return types with arguments of type ContextLoader Modifier and Type Method Description protected Class<? extends ContextLoader>WebTestContextBootstrapper. getDefaultContextLoaderClass(Class<?> testClass)ReturnsWebDelegatingSmartContextLoaderif the supplied class is annotated with@WebAppConfigurationand otherwise delegates to the superclass.Constructors in org.springframework.test.context.web with parameters of type ContextLoader Constructor Description WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)Create a newWebMergedContextConfigurationinstance for the supplied parameters.WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)Create a newWebMergedContextConfigurationinstance for the supplied parameters.