Annotation Type DoNotMock
-
@Inherited @Documented @Retention(SOURCE) @Target({TYPE,ANNOTATION_TYPE}) public @interface DoNotMock
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.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
value
The reason why the annotated type should not be mocked.
-
-
-
Element Detail
-
value
java.lang.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.
- Default:
- "Create a real instance instead"
-
-