Java Code Examples for org.mockito.junit.MockitoJUnitRunner

The following are top voted examples for showing how to use org.mockito.junit.MockitoJUnitRunner. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: singular-server   File: SingularServerSpringMockitoTestConfig.java   View source code 5 votes vote down vote up
public SingularServerSpringMockitoTestConfig(Object myTestClass) {
    if (myTestClass.getClass().isAnnotationPresent(RunWith.class)) {
        Class<? extends Runner> runnerClass = myTestClass.getClass().getDeclaredAnnotation(RunWith.class).value();
        if (runnerClass.isAssignableFrom(MockitoJUnitRunner.class)) {
            this.myTestClass = myTestClass;
            return;
        }
    }
    throw new IllegalArgumentException(this.getClass().getName() + " somente funciona com classes de teste cujo runner seja do tipo: " + MockitoJUnitRunner.class.getName());
}