spring-framework / org.springframework.test.context.support

Package org.springframework.test.context.support

Types

AbstractDirtiesContextTestExecutionListener

abstract class AbstractDirtiesContextTestExecutionListener : AbstractTestExecutionListener

Abstract base class for TestExecutionListener implementations that provide support for marking the ApplicationContext associated with a test as dirty for both test classes and test methods annotated with the DirtiesContext annotation.

The core functionality for this class was extracted from DirtiesContextTestExecutionListener in Spring Framework 4.2.

AnnotationConfigContextLoader

open class AnnotationConfigContextLoader : AbstractGenericContextLoader

Concrete implementation of AbstractGenericContextLoader that loads bean definitions from annotated classes.

See the Javadoc for org.springframework.test.context.ContextConfiguration for a definition of annotated class.

Note: AnnotationConfigContextLoader supports annotated classes rather than the String-based resource locations defined by the legacy org.springframework.test.context.ContextLoader API. Thus, although AnnotationConfigContextLoader extends AbstractGenericContextLoader, AnnotationConfigContextLoader does not support any String-based methods defined by AbstractContextLoader or AbstractGenericContextLoader. Consequently, AnnotationConfigContextLoader should chiefly be considered a org.springframework.test.context.SmartContextLoader rather than a org.springframework.test.context.ContextLoader.

AnnotationConfigContextLoaderUtils

abstract class AnnotationConfigContextLoaderUtils

Utility methods for SmartContextLoader that deal with annotated classes (e.g., Configuration classes).

DefaultActiveProfilesResolver

open class DefaultActiveProfilesResolver : ActiveProfilesResolver

Default implementation of the ActiveProfilesResolver strategy that resolves active bean definition profiles based solely on profiles configured declaratively via ActiveProfiles#profiles or ActiveProfiles#value.

DefaultBootstrapContext

open class DefaultBootstrapContext : BootstrapContext

Default implementation of the BootstrapContext interface.

DefaultTestContext

open class DefaultTestContext : TestContext

Default implementation of the TestContext interface.

DefaultTestContextBootstrapper

open class DefaultTestContextBootstrapper : AbstractTestContextBootstrapper

Default implementation of the TestContextBootstrapper SPI.

Uses DelegatingSmartContextLoader as the default ContextLoader.

DelegatingSmartContextLoader

open class DelegatingSmartContextLoader : AbstractDelegatingSmartContextLoader

DelegatingSmartContextLoader is a concrete implementation of AbstractDelegatingSmartContextLoader that delegates to a GenericXmlContextLoader (or a GenericGroovyXmlContextLoader if Groovy is present in the classpath) and an AnnotationConfigContextLoader.

GenericGroovyXmlContextLoader

open class GenericGroovyXmlContextLoader : GenericXmlContextLoader

Concrete implementation of AbstractGenericContextLoader that reads bean definitions from Groovy scripts and XML configuration files.

Default resource locations are detected using the suffixes "-context.xml" and "Context.groovy".

GenericPropertiesContextLoader

open class GenericPropertiesContextLoader : AbstractGenericContextLoader

Concrete implementation of AbstractGenericContextLoader that reads bean definitions from Java Properties resources.

TestPropertySourceUtils

abstract class TestPropertySourceUtils

Utility methods for working with TestPropertySource and adding test PropertySource to the Environment.

Primarily intended for use within the framework.