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 java.lang.reflect.Field;

import org.mockito.Mockito;
import org.mockito.internal.configuration.FieldAnnotationProcessor;
import org.mockito.internal.configuration.MockAnnotationProcessor;

import com.googlecode.gwt.test.Mock;

/**
 * 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 - 2025 Weber Informatics LLC | Privacy Policy