org.mockito.internal.creation.instance.InstantiatorProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockito-all Show documentation
Show all versions of mockito-all Show documentation
Mock objects library for java
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