Interface TestRuntimeHintsRegistrar
public interface TestRuntimeHintsRegistrar
Contract for registering
RuntimeHints
for integration tests run with
the Spring TestContext Framework based on the ClassLoader
of the deployment unit. Implementations should, if possible, use the specified
ClassLoader
to determine if hints have to be contributed.
Implementations of this interface must be registered statically in
META-INF/spring/aot.factories
by using the fully qualified name of this
interface as the key. A standard no-arg constructor is required for implementations.
This API serves as a companion to the core
RuntimeHintsRegistrar
API. If you need to register global hints for testing support that are not
specific to a particular test class or MergedContextConfiguration
, favor
implementing RuntimeHintsRegistrar
over this API.
- Since:
- 6.0
- Author:
- Sam Brannen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
registerHints
(MergedContextConfiguration mergedConfig, List<Class<?>> testClasses, RuntimeHints runtimeHints, ClassLoader classLoader) Contribute hints to the givenRuntimeHints
instance.
-
Method Details
-
registerHints
void registerHints(MergedContextConfiguration mergedConfig, List<Class<?>> testClasses, RuntimeHints runtimeHints, ClassLoader classLoader) Contribute hints to the givenRuntimeHints
instance.- Parameters:
mergedConfig
- the merged context configuration to processtestClasses
- the test classes that share the supplied merged context configurationruntimeHints
- theRuntimeHints
to useclassLoader
- the classloader to use
-