public class Reporter extends Object
| Constructor and Description |
|---|
Reporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
reportDifferentMetaData(Class<?> messageType,
Map<String,Object> missingEntries,
Map<String,Object> additionalEntries)
Report an error due to a difference in the metadata of a message
|
void |
reportDifferentPayloads(Class<?> messageType,
Field field,
Object actual,
Object expected)
Report an error due to a difference in one of the fields of the message payload.
|
void |
reportUnexpectedException(Throwable actualException,
org.hamcrest.Description expectation)
Reports an error due to an unexpected exception.
|
void |
reportUnexpectedReturnValue(Object actualReturnValue,
org.hamcrest.Description description)
Report an error due to an unexpected return value, while an exception was expected.
|
void |
reportWrongEvent(Collection<?> actualEvents,
Collection<?> expectedEvents,
Throwable probableCause)
Report an error in the ordering or count of events.
|
void |
reportWrongEvent(Collection<?> actualEvents,
org.hamcrest.StringDescription expectation,
Throwable probableCause)
Report an error in the ordering or count of events.
|
void |
reportWrongException(Throwable actualException,
org.hamcrest.Description description)
Report an error due to a an exception of an unexpected type.
|
void |
reportWrongExceptionMessage(Throwable actualException,
org.hamcrest.Description description)
Report an error due to a difference in exception message.
|
void |
reportWrongResult(Object actual,
Object expectation)
Reports an error due to a wrong return value.
|
public void reportWrongEvent(Collection<?> actualEvents, Collection<?> expectedEvents, Throwable probableCause)
actualEvents - The events that were foundexpectedEvents - The events that were expectedprobableCause - An optional exception that might be the reason for wrong eventspublic void reportWrongEvent(Collection<?> actualEvents, org.hamcrest.StringDescription expectation, Throwable probableCause)
actualEvents - The events that were foundexpectation - A Description of what was expectedprobableCause - An optional exception that might be the reason for wrong eventspublic void reportUnexpectedException(Throwable actualException, org.hamcrest.Description expectation)
actualException - The actual exceptionexpectation - A text describing what was expectedpublic void reportWrongResult(Object actual, Object expectation)
actual - The actual description / return valueexpectation - The expected description / return valuepublic void reportUnexpectedReturnValue(Object actualReturnValue, org.hamcrest.Description description)
actualReturnValue - The actual return valuedescription - A description describing the expected valuepublic void reportWrongException(Throwable actualException, org.hamcrest.Description description)
actualException - The actual exceptiondescription - A description describing the expected valuepublic void reportWrongExceptionMessage(Throwable actualException, org.hamcrest.Description description)
actualException - The actual exceptiondescription - A description describing the expected valuepublic void reportDifferentPayloads(Class<?> messageType, Field field, Object actual, Object expected)
messageType - The (runtime) type of the message the difference was found infield - The field that contains the differenceactual - The actual value of the fieldexpected - The expected value of the fieldpublic void reportDifferentMetaData(Class<?> messageType, Map<String,Object> missingEntries, Map<String,Object> additionalEntries)
messageType - The (runtime) type of the message the difference was found inmissingEntries - The expected key-value pairs that where not present in the metadataadditionalEntries - Key-value pairs that where present in the metadata but not expectedCopyright © 2010–2019. All rights reserved.