Examples of FederationError


Examples of org.waveprotocol.wave.federation.FederationErrorProto.FederationError

    final CountDownLatch finished = new CountDownLatch(1);

    Mockito.doAnswer(new Answer<Void>() {
      @Override
      public Void answer(InvocationOnMock invocation) throws Throwable {
        FederationError error = (FederationError) invocation.getArguments()[0];
        assertEquals(FederationError.Code.REMOTE_SERVER_TIMEOUT, error.getErrorCode());
        finished.countDown();
        return null;
      }
    }).when(callback).error(any(FederationError.class));
View Full Code Here

Examples of org.waveprotocol.wave.federation.FederationErrorProto.FederationError

    PacketCallback invalidCallback = mock(PacketCallback.class);
    final CountDownLatch finished = new CountDownLatch(1);
    Mockito.doAnswer(new Answer<Void>() {
      @Override
      public Void answer(InvocationOnMock invocation) throws Throwable {
        FederationError error = (FederationError) invocation.getArguments()[0];
        assertEquals(FederationError.Code.UNDEFINED_CONDITION, error.getErrorCode());
        finished.countDown();
        return null;
      }
    }).when(invalidCallback).error(any(FederationError.class));
View Full Code Here

Examples of org.waveprotocol.wave.federation.FederationErrorProto.FederationError

   * @param jid remote JID
   * @throws IllegalStateException if there is already a result for this domain
   */
  @VisibleForTesting
  void testInjectInDomainToJidMap(String domain, String jid) {
    FederationError error = null;
    if (jid == null) {
      error = FederationErrors.badRequest("Fake injected error");
    }
    RemoteDisco disco = discoRequests.getIfPresent(domain);
    Preconditions.checkState(disco == null);
View Full Code Here

Examples of org.waveprotocol.wave.federation.FederationErrorProto.FederationError

   * @param jid remote JID
   * @throws IllegalStateException if there is already a result for this domain
   */
  @VisibleForTesting
  void testInjectInDomainToJidMap(String domain, String jid) {
    FederationError error = null;
    if (jid == null) {
      error = FederationErrors.badRequest("Fake injected error");
    }
    Preconditions.checkState(
        discoRequests.putIfAbsent(domain, new RemoteDisco(domain, jid, error)) == null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.