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

org.mockito.configuration.GwtMockAnnotationProcessor Maven / Gradle / Ivy

There is a newer version: 0.63
Show newest version
package org.mockito.configuration;

import com.googlecode.gwt.test.Mock;
import org.mockito.Mockito;
import org.mockito.internal.configuration.FieldAnnotationProcessor;
import org.mockito.internal.configuration.MockAnnotationProcessor;

import java.lang.reflect.Field;

/**
 * Overrides {@link MockAnnotationProcessor} to manage Overlay types mocking using {@link Mock} from
 * gwt-test-utils.
 */
class GwtMockAnnotationProcessor implements FieldAnnotationProcessor {

    public Object process(Mock annotation, Field field) {
        // see @Mock answer default value
        return Mockito.mock(MockAnnotationProcessorHelper.getTypeToMock(field));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy