tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xavier Dury <>
Subject ApplicationComposer and qualified mocks
Date Wed, 05 Apr 2017 10:22:29 GMT

When using ApplicationComposer, I can declare mocks in my test classes like that:


MyDependency myDependency;

public Class<?> mockInjector() { return MockitoInjector.class; }

But that does not seem to work with (un@Named) qualified mocks:



MyDependency myDependency;

Of course, I can still make a producer for the qualified mock like this:

MyDependency myDependency() { return Mockito.mock(MyDependency.class); }

But I wanted to know if that was the only way to do it because, now, I have to programmatically
create the mock instead of declaring it with @Mock.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message