Top Description Methods
com.google.errorprone.annotations

public @Interface DoNotMock

extends Annotation
Annotations
@Inherited
@Documented
@Retention:RUNTIME
@Target:TYPE, ANNOTATION_TYPE
Imports
java.lang.annotation.Documented, .ElementType, .Inherited, .Retention, .RetentionPolicy, .Target

Annotation representing a type that should not be mocked.

When marking a type @DoNotMock, you should always point to alternative testing solutions such as standard fakes or other testing utilities.

Mockito tests can enforce this annotation by using a custom MockMaker which intercepts creation of mocks.

Method Summary

Modifier and TypeMethod and Description
public String
value()

The reason why the annotated type should not be mocked.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()

The reason why the annotated type should not be mocked.

This should suggest alternative APIs to use for testing objects of this type.