Package io.quarkus.test.junit.mockito
Annotation Type InjectMock
-
@Target(FIELD) @Retention(RUNTIME) public @interface InjectMock
When used on a field of a test class, the field becomes a Mockito mock, that is then used to mock the normal scoped bean which the field represents
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanconvertScopesIf true, then Quarkus will change the scope of the targetSingletonbean toApplicationScopedto make the 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 the mockable. This is an advanced setting and should only be used if you don't rely on the differences betweenSingletonandApplicationScopedbeans (for example it is invalid to read fields ofApplicationScopedbeans as a proxy stands in place of the actual implementation)- Default:
- false
-
-