MockInjection
Date: 2015-09-18

org.mockito.internal.configuration.injection

## Class MockInjection

- java.lang.Object
- - org.mockito.internal.configuration.injection.MockInjection

-     public class MockInjection
      extends java.lang.Object

  Internal injection configuration utility.

  Allow the user of this class to configure the way the injection of mocks will happen.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MockInjection.OngoingMockInjection` Ongoing configuration of the mock injector.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MockInjection()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MockInjection.OngoingMockInjection` | `onField(java.lang.reflect.Field field, java.lang.Object ofInstance)` Create a new configuration setup for a field
    `static MockInjection.OngoingMockInjection` | `onFields(java.util.Set<java.lang.reflect.Field> fields, java.lang.Object ofInstance)` Create a new configuration setup for fields

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MockInjection

          public MockInjection()

  - ### Method Detail

    - #### onField

          public static MockInjection.OngoingMockInjection onField(java.lang.reflect.Field field,
                                                   java.lang.Object ofInstance)

      Create a new configuration setup for a field
      Parameters:
        `field` - Field needing mock injection
        `ofInstance` - Instance owning the `field`
      Returns:
        New configuration builder

    - #### onFields

          public static MockInjection.OngoingMockInjection onFields(java.util.Set<java.lang.reflect.Field> fields,
                                                    java.lang.Object ofInstance)

      Create a new configuration setup for fields
      Parameters:
        `fields` - Fields needing mock injection
        `ofInstance` - Instance owning the `field`
      Returns:
        New configuration builder