接口的使用
cn.taketoday.test.context.ContextLoader
使用ContextLoader的程序包
程序包
说明
Classes and annotations related to configuring Infra
ApplicationContext for
tests.This package contains the TestContext Framework which
provides annotation-driven unit and integration testing support that is
agnostic of the actual testing framework in use.
Ahead-of-time (AOT) support for the Infra TestContext Framework.
Support for context caching within the TestContext Framework.
Support classes for the TestContext Framework.
Web support classes for the TestContext Framework.
-
cn.taketoday.framework.test.context中ContextLoader的使用
修饰符和类型类说明classAContextLoaderthat can be used to test Infra applications (those that normally startup usingApplication).修饰符和类型方法说明protected ContextLoaderInfraTestContextBootstrapper.resolveContextLoader(Class<?> testClass, List<ContextConfigurationAttributes> configAttributesList) 返回变量类型为ContextLoader的类型的cn.taketoday.framework.test.context中的方法修饰符和类型方法说明protected Class<? extends ContextLoader>InfraTestContextBootstrapper.getDefaultContextLoaderClass(Class<?> testClass) -
cn.taketoday.test.context中ContextLoader的使用
修饰符和类型接口说明interfaceStrategy interface for loading anapplication contextfor an integration test managed by the TestContext Framework.类型参数类型为ContextLoader的cn.taketoday.test.context中的字段修饰符和类型字段说明private final Class<? extends ContextLoader>ContextConfigurationAttributes.contextLoaderClass修饰符和类型方法说明MergedContextConfiguration.getContextLoader()Get the resolvedContextLoaderfor the test class.返回变量类型为ContextLoader的类型的cn.taketoday.test.context中的方法修饰符和类型方法说明Class<? extends ContextLoader>ContextConfigurationAttributes.getContextLoaderClass()Get theContextLoaderclass that was declared via@ContextConfiguration.参数类型为ContextLoader的cn.taketoday.test.context中的方法修饰符和类型方法说明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.参数类型为ContextLoader的cn.taketoday.test.context中的构造器限定符构造器说明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 cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader) Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.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 cn.taketoday.context.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 cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, List<cn.taketoday.core.io.PropertySourceDescriptor> propertySourceDescriptors, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newMergedContextConfigurationinstance for the supplied parameters. -
cn.taketoday.test.context.aot中ContextLoader的使用
修饰符和类型接口说明interfaceStrategy interface for loading anApplicationContextfor build-time AOT processing as well as run-time AOT execution for an integration test managed by the Infra TestContext Framework. -
cn.taketoday.test.context.cache中ContextLoader的使用
修饰符和类型方法说明private ContextLoaderDefaultCacheAwareContextLoaderDelegate.getContextLoader(MergedContextConfiguration mergedConfig) -
cn.taketoday.test.context.support中ContextLoader的使用
修饰符和类型类说明classAbstract application context loader that provides a basis for all concrete implementations of theContextLoaderSPI.classAbstractDelegatingSmartContextLoaderserves 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.classAbstract, generic extension ofAbstractContextLoaderthat loads aGenericApplicationContext.classConcrete implementation ofAbstractGenericContextLoaderthat loads bean definitions from component classes.classDelegatingSmartContextLoaderis a concrete implementation ofAbstractDelegatingSmartContextLoaderthat delegates to aGenericXmlContextLoaderAnnotationConfigContextLoader.classConcrete implementation ofAbstractGenericContextLoaderthat reads bean definitions from JavaPropertiesresources.classConcrete implementation ofAbstractGenericContextLoaderthat reads bean definitions from XML resources.修饰符和类型方法说明protected ContextLoaderAbstractTestContextBootstrapper.resolveContextLoader(Class<?> testClass, List<ContextConfigurationAttributes> configAttributesList) Resolve theContextLoaderclass to use for the supplied list ofContextConfigurationAttributesand then instantiate and return thatContextLoader.返回变量类型为ContextLoader的类型的cn.taketoday.test.context.support中的方法修饰符和类型方法说明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) -
cn.taketoday.test.context.web中ContextLoader的使用
修饰符和类型类说明classAbstract, generic extension ofAbstractContextLoaderthat loads aGenericWebApplicationContext.classConcrete implementation ofAbstractGenericWebContextLoaderthat loads bean definitions from annotated classes.classConcrete implementation ofAbstractGenericWebContextLoaderthat loads bean definitions from XML resources.classWebDelegatingSmartContextLoaderis a concrete implementation ofAbstractDelegatingSmartContextLoaderthat delegates to aGenericXmlWebContextLoaderand anAnnotationConfigWebContextLoader.返回变量类型为ContextLoader的类型的cn.taketoday.test.context.web中的方法修饰符和类型方法说明protected Class<? extends ContextLoader>WebTestContextBootstrapper.getDefaultContextLoaderClass(Class<?> testClass) ReturnsWebDelegatingSmartContextLoaderif the supplied class is annotated with@WebAppConfigurationand otherwise delegates to the superclass.参数类型为ContextLoader的cn.taketoday.test.context.web中的构造器限定符构造器说明WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.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 cn.taketoday.context.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.WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, List<cn.taketoday.core.io.PropertySourceDescriptor> propertySourceDescriptors, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newWebMergedContextConfigurationinstance for the supplied parameters.