Class DefaultDoNotMockEnforcer
java.lang.Object
org.mockito.internal.configuration.DefaultDoNotMockEnforcer
- All Implemented Interfaces:
DoNotMockEnforcer,DoNotMockEnforcerWithType
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mockito.plugins.DoNotMockEnforcer
DoNotMockEnforcer.Cache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckTypeForDoNotMockViolation(Class<?> type) Check whether this type is allowed to be mocked.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mockito.plugins.DoNotMockEnforcer
checkTypeForDoNotMockViolation
-
Constructor Details
-
DefaultDoNotMockEnforcer
public DefaultDoNotMockEnforcer()
-
-
Method Details
-
checkTypeForDoNotMockViolation
Description copied from interface:DoNotMockEnforcerCheck whether this type is allowed to be mocked. Returnnullif the enforcer allows this type to be mocked. Return a message if there is a reason this type can not be mocked.Note that traversal of the type hierarchy is performed externally to this method. Implementations of it should therefore not perform type traversal themselves.
- Specified by:
checkTypeForDoNotMockViolationin interfaceDoNotMockEnforcer- Parameters:
type- The type to check- Returns:
- Optional message if this type can not be mocked, or
nullotherwise - See Also:
-