Package io.quarkus.test
Annotation Type InjectMock
-
@Retention(RUNTIME) @Target(FIELD) public @interface InjectMock
Instructs the test engine to inject a mock instance of a bean in the field of a test class.This annotation is supported:
- in a
io.quarkus.test.component.QuarkusComponentTest, - in a
io.quarkus.test.QuarkusTestifquarkus-junit5-mockitois present.
Some test types impose additional restrictions and limitations. For example, only beans that have a client proxy may be mocked in a
io.quarkus.test.junit.QuarkusTest. - in a