Package org.waveprotocol.wave.federation.WaveletFederationProvider

Examples of org.waveprotocol.wave.federation.WaveletFederationProvider.SubmitResultListener


        .setVersion(VERSION_ONE.getVersion() + OPS_APPLIED)
        .setHistoryHash(ByteString.copyFromUtf8("blah")).build();

    disco.testInjectInDomainToJidMap(REMOTE_DOMAIN, REMOTE_JID);

    SubmitResultListener listener = mock(SubmitResultListener.class);
    remote.submitRequest(REMOTE_WAVELET, DUMMY_SIGNED_DELTA, listener);
    verifyZeroInteractions(listener);
    assertEquals(1, transport.packetsSent);

    // Validate the outgoing request.
View Full Code Here


   * error.
   */
  public void testSubmitRequestError() {
    disco.testInjectInDomainToJidMap(REMOTE_DOMAIN, REMOTE_JID);

    SubmitResultListener listener = mock(SubmitResultListener.class);
    remote.submitRequest(REMOTE_WAVELET, DUMMY_SIGNED_DELTA, listener);

    verifyZeroInteractions(listener);
    assertEquals(1, transport.packetsSent);

View Full Code Here

   * passes an error back to the wave server.
   */
  public void testSubmitRequestDiscoFailed() {
    disco.testInjectInDomainToJidMap(REMOTE_DOMAIN, null);

    SubmitResultListener listener = mock(SubmitResultListener.class);
    ProtocolSignedDelta signedDelta =
        ProtocolSignedDelta.newBuilder().setDelta(ByteString.copyFromUtf8("fake")).build();
    remote.submitRequest(REMOTE_WAVELET, signedDelta, listener);
    verify(listener).onFailure(any(FederationError.class));
    verify(listener, never())
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.federation.WaveletFederationProvider.SubmitResultListener

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.