Class InjectMocksScanner

java.lang.Object
org.mockito.internal.configuration.injection.scanner.InjectMocksScanner

public class InjectMocksScanner extends Object
Scan field for injection.
  • Constructor Details

    • InjectMocksScanner

      public InjectMocksScanner(Class<?> clazz)
      Create a new InjectMocksScanner for the given clazz on the given instance
      Parameters:
      clazz - Current class in the hierarchy of the test
  • Method Details

    • addTo

      public void addTo(Set<Field> mockDependentFields)
      Add the fields annotated by @InjectMocks
      Parameters:
      mockDependentFields - Set of fields annotated by @InjectMocks