Polish TCF key abstractions section in reference manual
This commit is contained in:
@@ -1231,30 +1231,30 @@ management>>), <<testcontext-support-classes,support classes>>, and
|
|||||||
|
|
||||||
[[testcontext-key-abstractions]]
|
[[testcontext-key-abstractions]]
|
||||||
==== Key abstractions
|
==== Key abstractions
|
||||||
The core of the framework consists of the `TestContext` and `TestContextManager` classes
|
The core of the framework consists of the `TestContextManager` class and the
|
||||||
and the `TestExecutionListener`, `ContextLoader`, and `SmartContextLoader` interfaces. A
|
`TestContext`, `TestExecutionListener`, and `SmartContextLoader` interfaces. A
|
||||||
`TestContextManager` is created on a per-test basis (e.g., for the execution of a single
|
`TestContextManager` is created per test class (e.g., for the execution of all test
|
||||||
test method in JUnit). The `TestContextManager` in turn manages a `TestContext` that
|
methods within a single test class in JUnit). The `TestContextManager` in turn manages a
|
||||||
holds the context of the current test. The `TestContextManager` also updates the state
|
`TestContext` that holds the context of the current test. The `TestContextManager` also
|
||||||
of the `TestContext` as the test progresses and delegates to ++TestExecutionListener++s,
|
updates the state of the `TestContext` as the test progresses and delegates to
|
||||||
which instrument the actual test execution by providing dependency injection, managing
|
++TestExecutionListener++s, which instrument the actual test execution by providing
|
||||||
transactions, and so on. A `ContextLoader` (or `SmartContextLoader`) is responsible for
|
dependency injection, managing transactions, and so on. A `SmartContextLoader` is
|
||||||
loading an `ApplicationContext` for a given test class. Consult the javadocs and the
|
responsible for loading an `ApplicationContext` for a given test class. Consult the
|
||||||
Spring test suite for further information and examples of various implementations.
|
javadocs and the Spring test suite for further information and examples of various
|
||||||
|
implementations.
|
||||||
|
|
||||||
* `TestContext`: Encapsulates the context in which a test is executed, agnostic of the
|
* `TestContext`: Encapsulates the context in which a test is executed, agnostic of the
|
||||||
actual testing framework in use, and provides context management and caching support
|
actual testing framework in use, and provides context management and caching support
|
||||||
for the test instance for which it is responsible. The `TestContext` also delegates to
|
for the test instance for which it is responsible. The `TestContext` also delegates to a
|
||||||
a `ContextLoader` (or `SmartContextLoader`) to load an `ApplicationContext` if
|
`SmartContextLoader` to load an `ApplicationContext` if requested.
|
||||||
requested.
|
|
||||||
* `TestContextManager`: The main entry point into the __Spring TestContext Framework__,
|
* `TestContextManager`: The main entry point into the __Spring TestContext Framework__,
|
||||||
which manages a single `TestContext` and signals events to all registered
|
which manages a single `TestContext` and signals events to all registered
|
||||||
++TestExecutionListener++s at well-defined test execution points:
|
++TestExecutionListener++s at well-defined test execution points:
|
||||||
** prior to any __before class methods__ of a particular testing framework
|
** prior to any __before class__ or __before all__ methods of a particular testing framework
|
||||||
** test instance preparation
|
** test instance post-processing
|
||||||
** prior to any __before methods__ of a particular testing framework
|
** prior to any __before__ or __before each__ methods of a particular testing framework
|
||||||
** after any __after methods__ of a particular testing framework
|
** after any __after__ or __after each__ methods of a particular testing framework
|
||||||
** after any __after class methods__ of a particular testing framework
|
** after any __after class__ or __after all__ methods of a particular testing framework
|
||||||
* `TestExecutionListener`: Defines a __listener__ API for reacting to test execution
|
* `TestExecutionListener`: Defines a __listener__ API for reacting to test execution
|
||||||
events published by the `TestContextManager` with which the listener is registered. See
|
events published by the `TestContextManager` with which the listener is registered. See
|
||||||
<<testcontext-tel-config>>.
|
<<testcontext-tel-config>>.
|
||||||
|
|||||||
Reference in New Issue
Block a user