Skip to content

Commit

Permalink
Testing - fix MockitoConfig(convertScopes = true)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkouba committed Jul 31, 2023
1 parent 773b8c1 commit 806c3f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@

import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.mockito.InjectMock;
import io.quarkus.test.junit.mockito.MockitoConfig;

@QuarkusTest
class GreetingSingletonResourceTest {

@InjectMock(convertScopes = true)
MessageServiceSingleton messageService;

@InjectMock(convertScopes = true)
@io.quarkus.test.InjectMock
@MockitoConfig(convertScopes = true)
SuffixServiceSingleton suffixService;

@InjectMock(convertScopes = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void execute(BuildContext context) {
continue;
}
if (instance.name().equals(MOCKITO_CONFIG)
&& instance.target().asField().hasAnnotation(INJECT_MOCK)) {
&& !instance.target().asField().hasAnnotation(INJECT_MOCK)) {
continue;
}
AnnotationValue allowScopeConversionValue = instance.value("convertScopes");
Expand Down

0 comments on commit 806c3f8

Please sign in to comment.