Package org.springframework.test.context
Class BootstrapUtils
java.lang.Object
org.springframework.test.context.BootstrapUtils
BootstrapUtils
is a collection of utility methods to assist with
bootstrapping the Spring TestContext Framework.
Only intended for internal use.
- Since:
- 4.1
- Author:
- Sam Brannen, Phillip Webb
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TestContextBootstrapper
resolveTestContextBootstrapper
(Class<?> testClass) Resolve theTestContextBootstrapper
type for the supplied test class using the defaultBootstrapContext
, instantiate the bootstrapper, and provide it a reference to theBootstrapContext
.
-
Constructor Details
-
BootstrapUtils
public BootstrapUtils()
-
-
Method Details
-
resolveTestContextBootstrapper
Resolve theTestContextBootstrapper
type for the supplied test class using the defaultBootstrapContext
, instantiate the bootstrapper, and provide it a reference to theBootstrapContext
.If the
@BootstrapWith
annotation is present on the test class, either directly or as a meta-annotation, then itsvalue
will be used as the bootstrapper type. Otherwise, either theDefaultTestContextBootstrapper
or theWebTestContextBootstrapper
will be used, depending on the presence of@WebAppConfiguration
.- Parameters:
testClass
- the test class for which the bootstrapper should be created- Returns:
- a fully configured
TestContextBootstrapper
- Since:
- 6.0
-