Skip to content

Commit

Permalink
Fix example code for mocking REST Clients in the REST Client Reactive…
Browse files Browse the repository at this point in the history
… guide

Since 2.12.1.Final, a @restclient qualifier is needed,
see quarkusio#28004

Signed-off-by: Harald Albers <[email protected]>
  • Loading branch information
albers committed Nov 23, 2022
1 parent de814ab commit 78cb98c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/src/main/asciidoc/rest-client-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1094,9 +1094,11 @@ Then, in your test you can simply use `@InjectMock` to create and inject a mock:

[source,java]
----
import static org.assertj.core.api.Assertions.assertThat;
package io.quarkus.it.rest.client.main;
import static org.mockito.Mockito.when;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand All @@ -1107,6 +1109,7 @@ import io.quarkus.test.junit.mockito.InjectMock;
public class InjectMockTest {
@InjectMock
@RestClient
Client mock;
@BeforeEach
Expand All @@ -1126,6 +1129,8 @@ If Mockito doesn't meet your needs, you can create a mock programmatically using

[source,java]
----
package io.quarkus.it.rest.client.main;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down

0 comments on commit 78cb98c

Please sign in to comment.