org.mockito.internal.junit.JUnitRule 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.junit;
import org.junit.runners.model.Statement;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
/**
* Internal implementation.
*/
public class JUnitRule {
public Statement apply(final Statement base, final Object target) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
MockitoAnnotations.initMocks(target);
base.evaluate();
Mockito.validateMockitoUsage();
}
};
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy