Class ApplicationErrorMatchers


  • public final class ApplicationErrorMatchers
    extends Object
    A collection of Mockito matchers for matching arguments of type ApplicationError.
    • Method Detail

      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(String description)
        Return an ArgumentMatcher matching only the given description.
        Parameters:
        description - the description to match
        Returns:
        the ArgumentMatcher instance
      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(String description,
                                                                                            Class<?> exceptionType)
        Return an ArgumentMatcher matching the given description and exception type.
        Parameters:
        description - the description to match
        exceptionType - the exception type to match (FQCN)
        Returns:
        the ArgumentMatcher instance
      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(String description,
                                                                                            Class<?> exceptionType,
                                                                                            String exceptionMessage)
        Return an ArgumentMatcher matching the given description, exception type, and exception message.
        Parameters:
        description - the description to match
        exceptionType - the exception type to match (FQCN)
        exceptionMessage - the exception message to match
        Returns:
        the ArgumentMatcher instance
      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(String description,
                                                                                            Class<?> exceptionType,
                                                                                            String exceptionMessage,
                                                                                            Class<?> exceptionCauseType)
        Return an ArgumentMatcher matching the given description, exception type, exception message, and exception cause type.
        Parameters:
        description - the description to match
        exceptionType - the exception type to match (FQCN)
        exceptionMessage - the exception message to match
        exceptionCauseType - the exception cause type to match (FQCN)
        Returns:
        the ArgumentMatcher instance
      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(String description,
                                                                                            Class<?> exceptionType,
                                                                                            String exceptionMessage,
                                                                                            Class<?> exceptionCauseType,
                                                                                            String exceptionCauseMessage)
        Return an ArgumentMatcher matching the given description, exception type, exception message, and exception cause type and message.
        Parameters:
        description - the description to match
        exceptionType - the exception type to match (FQCN)
        exceptionMessage - the exception message to match
        exceptionCauseType - the exception cause type to match (FQCN)
        exceptionCauseMessage - the exception cause message to match
        Returns:
        the ArgumentMatcher instance
      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(String description,
                                                                                            String hostName,
                                                                                            String ipAddress,
                                                                                            int port)
        Return an ArgumentMatcher matching the given description and host information.
        Parameters:
        description - the description to match
        hostName - the host name to match
        ipAddress - the IP address to match
        port - the port to match
        Returns:
        the ArgumentMatcher instance
      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(String description,
                                                                                            Class<?> exceptionType,
                                                                                            String hostName,
                                                                                            String ipAddress,
                                                                                            int port)
        Return an ArgumentMatcher matching the given description, exception type, and host information.
        Parameters:
        description - the description to match
        exceptionType - the exception type to match (FQCN)
        hostName - the host name to match
        ipAddress - the IP address to match
        port - the port to match
        Returns:
        the ArgumentMatcher instance
      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(String description,
                                                                                            Class<?> exceptionType,
                                                                                            String exceptionMessage,
                                                                                            Class<?> exceptionCauseType,
                                                                                            String exceptionCauseMessage,
                                                                                            String hostName,
                                                                                            String ipAddress,
                                                                                            int port)
        Return an ArgumentMatcher matching the given description, exception type and message, exception cause type and message, and host information.
        Parameters:
        description - the description to match
        exceptionType - the exception type to match (FQCN)
        exceptionMessage - the exception message to match
        exceptionCauseType - the exception cause type to match (FQCN)
        exceptionCauseMessage - the exception cause message to match
        hostName - the host name to match
        ipAddress - the IP address to match
        port - the port to match
        Returns:
        the ArgumentMatcher instance
      • matchesApplicationError

        public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError​(org.assertj.core.api.SoftAssertions softly,
                                                                                            String description,
                                                                                            Class<?> exceptionType,
                                                                                            String exceptionMessage,
                                                                                            Class<?> exceptionCauseType,
                                                                                            String exceptionCauseMessage,
                                                                                            String hostName,
                                                                                            String ipAddress,
                                                                                            int port)
        Return an ArgumentMatcher that "softly" matches the given description, exception type and message, exception cause type and message, and host information.
        Parameters:
        softly - the AssertJ SoftAssertions to collect errors
        description - the description to match
        exceptionType - the exception type to match (FQCN)
        exceptionMessage - the exception message to match
        exceptionCauseType - the exception cause type to match (FQCN)
        exceptionCauseMessage - the exception cause message to match
        hostName - the host name to match
        ipAddress - the IP address to match
        port - the port to match
        Returns:
        the ArgumentMatcher instance