Package io.quarkus.test.component
Interface MockBeanConfigurator<T>
- Type Parameters:
T-
- All Known Implementing Classes:
MockBeanConfiguratorImpl
public interface MockBeanConfigurator<T>
Configures a mock of a bean.
- See Also:
-
QuarkusComponentTestExtension#mock(Class)
-
Method Summary
Modifier and TypeMethodDescriptionalternative(boolean alternative) Set the function used to create a new bean instance and register this configurator.A Mockito mock object created from the bean class is used as a bean instance.createMockitoMock(Consumer<T> mockInitializer) A Mockito mock object created from the bean class is used as a bean instance.defaultBean(boolean defaultBean) priority(int priority) qualifiers(Annotation... qualifiers) scope(Class<? extends Annotation> scope)
-
Method Details
-
types
-
types
-
qualifiers
-
scope
-
name
-
alternative
-
priority
-
defaultBean
-
create
QuarkusComponentTestExtensionBuilder create(Function<io.quarkus.arc.SyntheticCreationalContext<T>, T> create) Set the function used to create a new bean instance and register this configurator.- Parameters:
create-- Returns:
- the test extension
-
createMockitoMock
QuarkusComponentTestExtensionBuilder createMockitoMock()A Mockito mock object created from the bean class is used as a bean instance.- Returns:
- the test extension
-
createMockitoMock
A Mockito mock object created from the bean class is used as a bean instance.- Returns:
- the test extension
-