Class ApplicationErrorMatchers
- java.lang.Object
-
- org.kiwiproject.dropwizard.error.test.mockito.ApplicationErrorMatchers
-
public final class ApplicationErrorMatchers extends Object
A collection of Mockito matchers for matching arguments of typeApplicationError
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.mockito.ArgumentMatcher<ApplicationError>
matchesApplicationError(String description)
Return anArgumentMatcher
matching only the given description.static org.mockito.ArgumentMatcher<ApplicationError>
matchesApplicationError(String description, Class<?> exceptionType)
Return anArgumentMatcher
matching the given description and exception type.static org.mockito.ArgumentMatcher<ApplicationError>
matchesApplicationError(String description, Class<?> exceptionType, String exceptionMessage)
Return anArgumentMatcher
matching the given description, exception type, and exception message.static org.mockito.ArgumentMatcher<ApplicationError>
matchesApplicationError(String description, Class<?> exceptionType, String exceptionMessage, Class<?> exceptionCauseType)
Return anArgumentMatcher
matching the given description, exception type, exception message, and exception cause type.static org.mockito.ArgumentMatcher<ApplicationError>
matchesApplicationError(String description, Class<?> exceptionType, String exceptionMessage, Class<?> exceptionCauseType, String exceptionCauseMessage)
Return anArgumentMatcher
matching the given description, exception type, exception message, and exception cause type and message.static org.mockito.ArgumentMatcher<ApplicationError>
matchesApplicationError(String description, Class<?> exceptionType, String exceptionMessage, Class<?> exceptionCauseType, String exceptionCauseMessage, String hostName, String ipAddress, int port)
Return anArgumentMatcher
matching the given description, exception type and message, exception cause type and message, and host information.static org.mockito.ArgumentMatcher<ApplicationError>
matchesApplicationError(String description, Class<?> exceptionType, String hostName, String ipAddress, int port)
Return anArgumentMatcher
matching the given description, exception type, and host information.static org.mockito.ArgumentMatcher<ApplicationError>
matchesApplicationError(String description, String hostName, String ipAddress, int port)
Return anArgumentMatcher
matching the given description and host information.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 anArgumentMatcher
that "softly" matches the given description, exception type and message, exception cause type and message, and host information.
-
-
-
Method Detail
-
matchesApplicationError
public static org.mockito.ArgumentMatcher<ApplicationError> matchesApplicationError(String description)
Return anArgumentMatcher
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 anArgumentMatcher
matching the given description and exception type.- Parameters:
description
- the description to matchexceptionType
- 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 anArgumentMatcher
matching the given description, exception type, and exception message.- Parameters:
description
- the description to matchexceptionType
- 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 anArgumentMatcher
matching the given description, exception type, exception message, and exception cause type.- Parameters:
description
- the description to matchexceptionType
- the exception type to match (FQCN)exceptionMessage
- the exception message to matchexceptionCauseType
- 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 anArgumentMatcher
matching the given description, exception type, exception message, and exception cause type and message.- Parameters:
description
- the description to matchexceptionType
- the exception type to match (FQCN)exceptionMessage
- the exception message to matchexceptionCauseType
- 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 anArgumentMatcher
matching the given description and host information.- Parameters:
description
- the description to matchhostName
- the host name to matchipAddress
- the IP address to matchport
- 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 anArgumentMatcher
matching the given description, exception type, and host information.- Parameters:
description
- the description to matchexceptionType
- the exception type to match (FQCN)hostName
- the host name to matchipAddress
- the IP address to matchport
- 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 anArgumentMatcher
matching the given description, exception type and message, exception cause type and message, and host information.- Parameters:
description
- the description to matchexceptionType
- the exception type to match (FQCN)exceptionMessage
- the exception message to matchexceptionCauseType
- the exception cause type to match (FQCN)exceptionCauseMessage
- the exception cause message to matchhostName
- the host name to matchipAddress
- the IP address to matchport
- 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 anArgumentMatcher
that "softly" matches the given description, exception type and message, exception cause type and message, and host information.- Parameters:
softly
- the AssertJSoftAssertions
to collect errorsdescription
- the description to matchexceptionType
- the exception type to match (FQCN)exceptionMessage
- the exception message to matchexceptionCauseType
- the exception cause type to match (FQCN)exceptionCauseMessage
- the exception cause message to matchhostName
- the host name to matchipAddress
- the IP address to matchport
- the port to match- Returns:
- the ArgumentMatcher instance
-
-