Package io.quarkus.test.junit.mockito
Annotation Type MockitoConfig
-
@Target(FIELD) @Retention(RUNTIME) public @interface MockitoConfig
This annotation can be used to configure a Mockito mock injected in a field of a test class that is annotated withInjectMock. This annotation is only supported in aio.quarkus.test.QuarkusTest.- See Also:
InjectMock
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanconvertScopesIf true, then Quarkus will change the scope of the targetSingletonbean toApplicationScopedto make it mockable.booleanreturnsDeepMocksIf true, the mock will be created with theMockito.RETURNS_DEEP_STUBS
-
-
-
Element Detail
-
convertScopes
boolean convertScopes
If true, then Quarkus will change the scope of the targetSingletonbean toApplicationScopedto make it mockable.This is an advanced setting and should only be used if you don't rely on the differences between
SingletonandApplicationScopedbeans (for example it is invalid to read fields ofApplicationScopedbeans as a proxy stands in place of the actual implementation)- Default:
- false
-
-