Package org.wildfly.test.cloud.common
Interface ValueInjector
-
public interface ValueInjectorUsed to inject field values in tests that are annotated with@Inject.Note that implementations must have a public no-arg constructor.
- Author:
- James R. Perkins
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancanInject(Class<?> type)Determines if this injector can handle the fields type.Objectresolve(org.junit.jupiter.api.extension.ExtensionContext context)Returns the value to be injected.Class<?>supportedType()Returns the type this injector can inject.
-
-
-
Method Detail
-
canInject
default boolean canInject(Class<?> type)
Determines if this injector can handle the fields type.- Parameters:
type- the fields type- Returns:
trueif this injector can handle the field type, otherwisefalse
-
supportedType
Class<?> supportedType()
Returns the type this injector can inject.- Returns:
- the type this injector can inject
-
resolve
Object resolve(org.junit.jupiter.api.extension.ExtensionContext context)
Returns the value to be injected.- Parameters:
context- the extensions context- Returns:
- the value to be injected
-
-