public class Reporter extends Object
| Constructor and Description |
|---|
Reporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
reportDifferenceInStoredVsPublished(Collection<DomainEventMessage<?>> storedEvents,
Collection<EventMessage<?>> publishedEvents,
Throwable probableCause)
Report a failed assertion due to a difference in the stored versus the published events.
|
void |
reportDifferentEventContents(Class<?> eventType,
Field field,
Object actual,
Object expected)
Report an error due to a difference in on of the fields of an event.
|
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 |
reportWrongResult(Object actualReturnValue,
org.hamcrest.Description expectation)
Reports an error due to a wrong return value.
|
public void reportDifferenceInStoredVsPublished(Collection<DomainEventMessage<?>> storedEvents, Collection<EventMessage<?>> publishedEvents, Throwable probableCause)
storedEvents - The events that were storedpublishedEvents - The events that were publishedprobableCause - An exception that might be the cause of the failurepublic 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 actualReturnValue, org.hamcrest.Description expectation)
actualReturnValue - The actual return valueexpectation - A description of the expected 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 reportDifferentEventContents(Class<?> eventType, Field field, Object actual, Object expected)
eventType - The (runtime) type of event the difference was found infield - The field that contains the differenceactual - The actual value of the fieldexpected - The expected value of the fieldCopyright © 2010–2017. All rights reserved.