Package com.google.checkout.sdk.testing

Examples of com.google.checkout.sdk.testing.HistoricalNotificationDispatcher


            baos.write(b);
          }
        };
      }
    };
    HistoricalNotificationDispatcher dispatcher =
        new HistoricalNotificationDispatcher(request, response) {
      @Override
      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(
View Full Code Here

TOP

Related Classes of com.google.checkout.sdk.testing.HistoricalNotificationDispatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.