Class DefaultDoNotMockEnforcer

    • Constructor Detail

      • DefaultDoNotMockEnforcer

        public DefaultDoNotMockEnforcer()
    • Method Detail

      • checkTypeForDoNotMockViolation

        public java.lang.String checkTypeForDoNotMockViolation​(java.lang.Class<?> type)
        Description copied from interface: DoNotMockEnforcer
        Check whether this type is allowed to be mocked. Return null if 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:
        checkTypeForDoNotMockViolation in interface DoNotMockEnforcer
        Parameters:
        type - The type to check
        Returns:
        Optional message if this type can not be mocked, or null otherwise
        See Also:
        DoNotMockEnforcer.checkTypeForDoNotMockViolation(MockCreationSettings)