All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mockito.internal.creation.instance.InstantiatorProvider Maven / Gradle / Ivy

There is a newer version: 2.0.2-beta
Show newest version
package org.mockito.internal.creation.instance;

import org.mockito.mock.MockCreationSettings;

public class InstantiatorProvider {

    private final static Instantiator INSTANCE = new ObjenesisInstantiator();

    public Instantiator getInstantiator(MockCreationSettings settings) {
        if (settings.isUsingConstructor()) {
            return new ConstructorInstantiator(settings.getOuterClassInstance());
        } else {
            return INSTANCE;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy