Package org.springframework.test.context

# Class BootstrapUtils

java.lang.Object
org.springframework.test.context.BootstrapUtils

public abstract class BootstrapUtils extends Object
`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:
  - `BootstrapWith`
  - `BootstrapContext`
  - `TestContextBootstrapper`

## Constructor Summary

Constructors
Constructor
Description
`BootstrapUtils()`

## Method Summary

Modifier and Type
Method
Description
`static TestContextBootstrapper`
`resolveTestContextBootstrapper(Class<?> testClass)`
Resolve the `TestContextBootstrapper` type for the supplied test class using the default `BootstrapContext`, instantiate the bootstrapper, and provide it a reference to the `BootstrapContext`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### BootstrapUtils

public BootstrapUtils()

## Method Details

### resolveTestContextBootstrapper

public static TestContextBootstrapper resolveTestContextBootstrapper(Class<?> testClass)
Resolve the `TestContextBootstrapper` type for the supplied test class using the default `BootstrapContext`, instantiate the bootstrapper, and provide it a reference to the `BootstrapContext`.

If the `@BootstrapWith` annotation is present on the test class, either directly or as a meta-annotation, then its `value` will be used as the bootstrapper type. Otherwise, either the `DefaultTestContextBootstrapper` or the `WebTestContextBootstrapper` 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