Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-1958

Mockito doesn't @MockInjector to be set as container properties

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 7.0.2
    • None
    • None

    Description

      Currently, when using ApplicationComposer, @MockInjector can be declared in two ways:

      public @MockInjector FallbackPropertyInjector injector() {
      	return new MockitoInjector();
      }
      
      public @MockInjector Class<? extends FallbackPropertyInjector> injectorClass() {
      	return MockitoInjector.class;
      }
      

      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:

      @RunWith(ApplicationComposer.class)
      @MockInjector(MockitoInjector.class)
      @Classes(...)
      public class MyTest {...}
      

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            kalgon Xavier Dury
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: