Examples of ConversationBlip


Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

    ObservableConversation conversation =
        context.openConversation(WAVE_ID, WAVELET_ID, ALEX).getRoot();

    // Append the text markup to the newly created blip.
    DocInitialization blipInitContent = new DocInitializationBuilder().build();
    ConversationBlip markupBlip = conversation.getRootThread().appendBlip(blipInitContent);

    OperationRequest operation = operationRequest(OperationType.DOCUMENT_APPEND_MARKUP,
        markupBlip.getId(), Parameter.of(ParamsProperty.CONTENT, markup));

    service.execute(operation, context, ALEX);

    JsonRpcResponse response = context.getResponse(OPERATION_ID);
    assertFalse("LineMarkup generated error in service execution.", response.isError());

    // The output should now include the default <line/> element.
    String lineContent = markupBlip.getContent().toXmlString();
    assertTrue("Expected the blip to append the default wave <line/> element. " +
        "actual content: " + lineContent, lineContent.contains("<line/>"+markup));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

    service.execute(operation, context, ALEX);

    JsonRpcResponse response = context.getResponse(OPERATION_ID);
    assertFalse(response.isError());

    ConversationBlip newBlip = checkAndGetNewBlip(context, conversation, response);

    Iterator<? extends LocatedReplyThread<? extends ObservableConversationThread>> it =
        conversation.getRootThread().getFirstBlip().locateReplyThreads().iterator();
    LocatedReplyThread<? extends ObservableConversationThread> inlineReplyThread = it.next();
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

    service.execute(operation, context, ALEX);

    JsonRpcResponse response = context.getResponse(OPERATION_ID);
    assertFalse(response.isError());

    ConversationBlip newBlip = checkAndGetNewBlip(context, conversation, response);

    Iterator<? extends LocatedReplyThread<? extends ObservableConversationThread>> it =
        conversation.getRootThread().getFirstBlip().locateReplyThreads().iterator();
    LocatedReplyThread<? extends ObservableConversationThread> inlineReplyThread = it.next();
    assertEquals("The inline reply was not located where specified", insertAtXmlLocation,
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

    service.execute(operation, context, ALEX);

    JsonRpcResponse response = context.getResponse(OPERATION_ID);
    assertFalse(response.isError());

    ConversationBlip newBlip = checkAndGetNewBlip(context, conversation, response);

    // The second InlineReplyThread is created by the BlipOperationService, it
    // should be located just after the first one.
    Iterator<? extends LocatedReplyThread<?>> it =
        conversation.getRootThread().getFirstBlip().locateReplyThreads().iterator();
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

  private ConversationBlip checkAndGetNewBlip(
      OperationContextImpl context, ObservableConversation conversation, JsonRpcResponse response)
      throws InvalidRequestException {
    // Retrieve the blip using the context so that the temp blip storage is
    // checked
    ConversationBlip newBlip = context.getBlip(conversation, TEMP_BLIP_ID);
    assertEquals("The response didn't contain the id of the new blip", newBlip.getId(),
        response.getData().get(ParamsProperty.NEW_BLIP_ID));
    String actualContent = newBlip.getContent().toXmlString();
    assertTrue("Expected the new blip to contain the contens as specified in the operation",
        actualContent.contains(NEW_BLIP_CONTENT));
    return newBlip;
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

    waveViewData = WaveViewDataImpl.create(waveId, ImmutableList.of(waveletData, userWaveletData));
  }

  public void appendBlipWithText(String text) {
    ConversationBlip blip = conversation.getRootThread().appendBlip();
    LineContainers.appendToLastLine(blip.getContent(), XmlStringBuilder.createText(text));
    TitleHelper.maybeFindAndSetImplicitTitle(blip.getContent());
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

  }

  private FakeConversationView createWave() {
    FakeConversationView wave = FakeConversationView.builder().build();
    Conversation c = wave.createRoot();
    ConversationBlip b1 = c.getRootThread().appendBlip();
    ConversationBlip b2 = c.getRootThread().appendBlip();
    write(b1, "First blip");
    write(b2, "Second blip");
    ConversationThread b1t1 = b1.addReplyThread(5);
    write(b1t1.appendBlip(), "First reply");
    ConversationThread b1t2 = b1.addReplyThread();
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

      this.blipBuilders = blipBuilders;
    }

    void populate(ConversationThread thread, FakeThreadView threadUi) {
      for (BlipBuilder blipBuilder : blipBuilders) {
        ConversationBlip blip = thread.appendBlip();
        blip.getContent().insertText(blip.getContent().size() - 1, "Blip " + blipCount++);
        blipBuilder.populate(blip, threadUi.insertBlipBefore(null, blip));
      }
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

    target = new DiffController(wave, supplement, documents, models);
  }

  public void testFreshBlipsAreSuppressedOnStartup() {
    Conversation conv = wave.createRoot();
    ConversationBlip root = conv.getRootThread().appendBlip();

    MockDoc fresh = mock(MockDoc.class);
    when(fresh.isCompleteDiff()).thenReturn(true, false);
    when(documents.get(root)).thenReturn(fresh);
    target.install();
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationBlip

    verify(fresh, never()).stopDiffSuppression();
  }

  public void testReadBlipsNotSuppressedOnStartup() {
    Conversation conv = wave.createRoot();
    ConversationBlip root = conv.getRootThread().appendBlip();

    MockDoc seen = mock(MockDoc.class);
    when(seen.isCompleteDiff()).thenReturn(false);
    when(documents.get(root)).thenReturn(seen);
    target.install();
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.