public void onAllNotifications(
OrderSummary orderSummary, Notification notification)
throws Exception {
List<DispatcherHistoryElement> history = this.getHistory();
assertEquals(
new DispatcherHistoryElement(NotificationDispatcherTest.SERIAL_NUMBER,
"startTransaction", false, false),
history.get(0));
assertEquals(
new DispatcherHistoryElement(NotificationDispatcherTest.SERIAL_NUMBER,
"hasAlreadyHandled", false, false),
history.get(1));
assertEquals(2, history.size());
}
};
apiContext().handleNotification(dispatcher);
List<DispatcherHistoryElement> history = dispatcher.getHistory();
assertEquals(
new DispatcherHistoryElement(SERIAL_NUMBER,
"startTransaction", false, false),
history.get(0));
assertEquals(
new DispatcherHistoryElement(SERIAL_NUMBER,
"hasAlreadyHandled", false, false),
history.get(1));
assertEquals(
new DispatcherHistoryElement(SERIAL_NUMBER,
"rememberSerialNumber", false, true),
history.get(2));
assertEquals(
new DispatcherHistoryElement(SERIAL_NUMBER,
"commitTransaction", true, true),
history.get(3));
assertEquals(4, history.size());
assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
+ "<notification-acknowledgment "