[ 
https://issues.apache.org/jira/browse/TOMEE-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Romain Manni-Bucau resolved TOMEE-1958.
---------------------------------------
       Resolution: Fixed
         Assignee: Romain Manni-Bucau
    Fix Version/s: 7.0.2

I understand now,

issue was not about @MockInjector but mockito CDI integration which was 
executed before the mock injector was used which was causing not yet created 
references.

Fixed mockito integration to support that.

> Mockito doesn't @MockInjector to be set as container properties
> ---------------------------------------------------------------
>
>                 Key: TOMEE-1958
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1958
>             Project: TomEE
>          Issue Type: Improvement
>            Reporter: Xavier Dury
>            Assignee: Romain Manni-Bucau
>            Priority: Trivial
>             Fix For: 7.0.2
>
>
> Currently, when using {{ApplicationComposer}}, {{@MockInjector}} can be 
> declared in two ways:
> {code}
> public @MockInjector FallbackPropertyInjector injector() {
>       return new MockitoInjector();
> }
> public @MockInjector Class<? extends FallbackPropertyInjector> 
> injectorClass() {
>       return MockitoInjector.class;
> }
> {code}
> As almost everything can now be declared with annotations on the test class 
> ({{@ContainerProperties}} = {{@Configuration}}, {{@Classes}} ~ {{@Module}}), 
> it would be nice if {{@MockInjector}} could be too:
> {code}
> @RunWith(ApplicationComposer.class)
> @MockInjector(MockitoInjector.class)
> @Classes(...)
> public class MyTest {...}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to