Skip to content

Commit

Permalink
Prefer mocks
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
  • Loading branch information
jbescos committed Apr 23, 2024
1 parent 8aa9531 commit e0cd11b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ void registerOtherBeans(@Observes AfterBeanDiscovery event) {
event.addBean()
.addType(type)
.scope(ApplicationScoped.class)
.alternative(true)
.createWith(inst -> Mockito.mock(type))
.priority(0);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

@HelidonTest
@AddBean(TestMockBean.Resource.class)
//@AddBean(TestMockBean.Service.class)
//@AddBean(TestMockBean.OtherService.class)
@AddBean(TestMockBean.Service.class)
@AddBean(TestMockBean.OtherService.class)
public class TestMockBean {

// Without @Inject
Expand Down

0 comments on commit e0cd11b

Please sign in to comment.