Class ConstructorInjection

java.lang.Object
org.mockito.internal.configuration.injection.MockInjectionStrategy
org.mockito.internal.configuration.injection.ConstructorInjection

public class ConstructorInjection extends MockInjectionStrategy
Injection strategy based on constructor.

The strategy will search for the constructor with most parameters and try to resolve mocks by type.

TODO on missing mock type, shall it abandon or create "noname" mocks. TODO and what if the arg type is not mockable.

For now the algorithm tries to create anonymous mocks if an argument type is missing. If not possible the algorithm abandon resolution.