Package org.mockito.plugins
Interface DoNotMockEnforcerWithType
- All Known Subinterfaces:
DoNotMockEnforcer
public interface DoNotMockEnforcerWithType
Enforcer that checks if a mock can be created given its type and other settings used in its creation.
- Since:
- 5.9.0
-
Method Summary
Modifier and TypeMethodDescriptioncheckTypeForDoNotMockViolation
(MockCreationSettings<?> creationSettings) Check whether this type is allowed to be mocked.
-
Method Details
-
checkTypeForDoNotMockViolation
Check whether this type is allowed to be mocked. Returnnull
if the enforcer allows this type to be mocked. Return a message if there is a reason this type can not be mocked.- Parameters:
creationSettings
- The mock creation settings- Returns:
- Optional message if this type can not be mocked, or
null
otherwise
-