Interface AnnotationEngine

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.Object createMockFor​(java.lang.annotation.Annotation annotation, java.lang.reflect.Field field)
      Deprecated.
      Please use process(Class, Object) method instead that is more robust
      void process​(java.lang.Class<?> clazz, java.lang.Object testInstance)
      Allows extending the interface to perform action on specific fields on the test class.
    • Method Detail

      • createMockFor

        @Deprecated
        java.lang.Object createMockFor​(java.lang.annotation.Annotation annotation,
                                       java.lang.reflect.Field field)
        Deprecated.
        Please use process(Class, Object) method instead that is more robust

        Creates mock, ArgumentCaptor or wraps field instance in spy object. Only if of correct annotation type.

        Parameters:
        annotation - Annotation
        field - Field details
      • process

        void process​(java.lang.Class<?> clazz,
                     java.lang.Object testInstance)
        Allows extending the interface to perform action on specific fields on the test class.

        See the implementation of this method to figure out what is it for.

        Parameters:
        clazz - Class where to extract field information, check implementation for details
        testInstance - Test instance