Package org.mockito.plugins
Interface DoNotMockEnforcerWithType
-
- All Known Subinterfaces:
DoNotMockEnforcer
- All Known Implementing Classes:
DefaultDoNotMockEnforcer
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
checkTypeForDoNotMockViolation(MockCreationSettings<?> creationSettings)
Check whether this type is allowed to be mocked.
-
-
-
Method Detail
-
checkTypeForDoNotMockViolation
java.lang.String checkTypeForDoNotMockViolation(MockCreationSettings<?> creationSettings)
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
-
-