public class WebTestContextBootstrapper extends DefaultTestContextBootstrapper
TestContextBootstrapper
SPI.
WebDelegatingSmartContextLoader
as the default ContextLoader
if the test class is annotated with @WebAppConfiguration
and otherwise delegates to the superclass.
WebMergedContextConfiguration
if the test class is annotated
with @WebAppConfiguration
.
Constructor and Description |
---|
WebTestContextBootstrapper() |
Modifier and Type | Method and Description |
---|---|
protected Class<? extends ContextLoader> |
getDefaultContextLoaderClass(Class<?> testClass)
Returns
WebDelegatingSmartContextLoader if the supplied class is
annotated with @WebAppConfiguration and
otherwise delegates to the superclass. |
protected MergedContextConfiguration |
processMergedContextConfiguration(MergedContextConfiguration mergedConfig)
Returns a
WebMergedContextConfiguration if the test class in the
supplied MergedContextConfiguration is annotated with
@WebAppConfiguration and otherwise returns
the supplied instance unmodified. |
buildMergedContextConfiguration, buildTestContext, getBootstrapContext, getCacheAwareContextLoaderDelegate, getDefaultTestExecutionListenerClasses, getDefaultTestExecutionListenerClassNames, getTestExecutionListeners, resolveContextLoader, resolveExplicitContextLoaderClass, setBootstrapContext
protected Class<? extends ContextLoader> getDefaultContextLoaderClass(Class<?> testClass)
WebDelegatingSmartContextLoader
if the supplied class is
annotated with @WebAppConfiguration
and
otherwise delegates to the superclass.getDefaultContextLoaderClass
in class DefaultTestContextBootstrapper
testClass
- the test class for which to retrieve the default
ContextLoader
classContextLoader
class for the supplied test class
(never null
)protected MergedContextConfiguration processMergedContextConfiguration(MergedContextConfiguration mergedConfig)
WebMergedContextConfiguration
if the test class in the
supplied MergedContextConfiguration
is annotated with
@WebAppConfiguration
and otherwise returns
the supplied instance unmodified.processMergedContextConfiguration
in class AbstractTestContextBootstrapper
mergedConfig
- the MergedContextConfiguration
to process; never null
MergedContextConfiguration
; never null