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 |
reportDifferentPayloads(Class<?> messageType,
Object actual,
Object expected)
Report an error due to a difference between the message payloads.
|
void |
reportIncorrectDeletedState(boolean expectedDeletedState)
Report an error due to a difference in the expected state of the `isDeleted` marker on the Aggregate.
|
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.Description expectation,
org.hamcrest.Description mismatch,
Throwable probableCause)
Report an error of events not matching expectations defined by
Matchers. |
void |
reportWrongEvent(Collection<?> actualEvents,
org.hamcrest.StringDescription expectation,
Throwable probableCause)
Deprecated.
This method has been previously used to report non-matching
Matcher results.
Has been replaced by reportWrongEvent(Collection, Description, Description, Throwable).
The method is kept for api backwards compatibility only and my be removed in a future release. |
void |
reportWrongException(Throwable actualException,
org.hamcrest.Description description)
Report an error due to an exception of an unexpected type.
|
void |
reportWrongExceptionDetails(Object details,
org.hamcrest.Description description)
Report an error due to a difference in exception details.
|
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 events@Deprecated public void reportWrongEvent(Collection<?> actualEvents, org.hamcrest.StringDescription expectation, Throwable probableCause)
Matcher results.
Has been replaced by reportWrongEvent(Collection, Description, Description, Throwable).
The method is kept for api backwards compatibility only and my be removed in a future release.actualEvents - The events that were foundexpectation - A Description of what was expectedprobableCause - An optional exception that might be the reason for wrong eventspublic void reportWrongEvent(Collection<?> actualEvents, org.hamcrest.Description expectation, org.hamcrest.Description mismatch, Throwable probableCause)
Matchers. This method will
receive two different Descriptions:
expectation: textual description of the complete matcher (chain) that has been usedmismatch: detailed description of the mismatch.actualEvents - The events that were foundexpectation - A Description of what was expectedmismatch - detailed description of the actual mismatch.probableCause - 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 reportWrongExceptionDetails(Object details, org.hamcrest.Description description)
details - The actual detailsdescription - A description describing the expected valuepublic void reportDifferentPayloads(Class<?> messageType, Object actual, Object expected)
messageType - The (runtime) type of the message the difference was found in.actual - The actual value of the payload.expected - The expected value of the payload.public void reportDifferentPayloads(Class<?> messageType, Field field, Object actual, Object expected)
messageType - The (runtime) type of the message the difference was found in.field - The field that contains the difference.actual - The actual value of the field.expected - The expected value of the field.public 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 expectedpublic void reportIncorrectDeletedState(boolean expectedDeletedState)
expectedDeletedState - true if the Aggregate should have been marked as deleted, but was not.
false if the Aggregate should not have been marked as deleted, but was.Copyright © 2010–2023. All rights reserved.