Package org.waveprotocol.wave.model.conversation

Examples of org.waveprotocol.wave.model.conversation.ObservableConversationThread.appendBlip()


  }

  public void testGenerateWaveletBlipRemovedEvent() throws Exception {
    ObservableConversationThread rootThread =
        conversationUtil.buildConversation(wavelet).getRoot().getRootThread();
    ObservableConversationBlip newBlip = rootThread.appendBlip();
    newBlip.delete();
    EventMessageBundle messages = generateAndCheckEvents(EventType.WAVELET_BLIP_REMOVED);
    assertEquals("Expected two events", 2, messages.getEvents().size());
    // Blip removed should be the second event.
    WaveletBlipRemovedEvent event = WaveletBlipRemovedEvent.as(messages.getEvents().get(1));
View Full Code Here


  //

  public void testNewBlipIsUnread() {
    WaveletBasedConversation c = setUpWithWaveModel();
    ObservableConversationThread t = c.getRootThread();
    ConversationBlip b = t.appendBlip();

    assertTrue(supplement.isUnread(b));
  }

  public void testMarkBlipAsReadAffectsBlipReadState() {
View Full Code Here

  }

  public void testMarkBlipAsReadAffectsBlipReadState() {
    WaveletBasedConversation c = setUpWithWaveModel();
    ObservableConversationThread t = c.getRootThread();
    ConversationBlip b = t.appendBlip();

    supplement.markAsRead(b);
    assertFalse(supplement.isUnread(b));
  }
View Full Code Here

  public void testMarkBlipIsIdempotent() {
    // Use real wave-model view.
    WaveletBasedConversation c = setUpWithWaveModel();
    Wavelet w = c.getWavelet();
    ObservableConversationThread t = c.getRootThread();
    ConversationBlip b = t.appendBlip();

    supplement.markAsRead(b);
    int blipReadVersion = substrate.getLastReadBlipVersion(w.getId(), b.getId());
    int waveletVersion = (int) w.getVersion();
    assertEquals(waveletVersion, blipReadVersion);
View Full Code Here

    int blipReadVersion = substrate.getLastReadBlipVersion(w.getId(), b.getId());
    int waveletVersion = (int) w.getVersion();
    assertEquals(waveletVersion, blipReadVersion);

    // Do something to increase wavelet version without increasing blip last-modified version.
    t.appendBlip();
    assert w.getVersion() > waveletVersion : "test wave model did not increase version";

    // Test that marking blip as read again has no effect.
    supplement.markAsRead(b);
    long newBlipReadVersion = substrate.getLastReadBlipVersion(w.getId(), b.getId());
View Full Code Here

    // design reason to test this use case; this is just here because it was a
    // specific case that was failing before.
    WaveletBasedConversation c = setUpWithWaveModel();
    Wavelet w = c.getWavelet();
    ObservableConversationThread t = c.getRootThread();
    ConversationBlip b = t.appendBlip();

    supplement.markAsRead(b);
    supplement.markAsUnread();

    // Do something to increase wavelet version without increasing blip last-modified version.
View Full Code Here

    supplement.markAsRead(b);
    supplement.markAsUnread();

    // Do something to increase wavelet version without increasing blip last-modified version.
    t.appendBlip();

    // Mark as read again, test that it's marked at wavelet version.
    supplement.markAsRead(b);
    int blipReadVersion = substrate.getLastReadBlipVersion(w.getId(), b.getId());
    assertEquals(blipReadVersion, (int) w.getVersion());
View Full Code Here

    // design reason to test this use case; this is just here because it was a
    // specific case that was failing before.
    WaveletBasedConversation c = setUpWithWaveModel();
    Wavelet w = c.getWavelet();
    ObservableConversationThread t = c.getRootThread();
    ConversationBlip b = t.appendBlip();

    supplement.markAsRead(b);
    supplement.markAsUnread();

    // Increase both last-modified blip version and wavelet version (but latter more than former).
View Full Code Here

    supplement.markAsRead(b);
    supplement.markAsUnread();

    // Increase both last-modified blip version and wavelet version (but latter more than former).
    b.getContent().appendXml(Blips.INITIAL_CONTENT);
    t.appendBlip();

    // Mark as read again, test that it's marked at wavelet version, not blip last-modified version.
    supplement.markAsRead(b);
    long blipReadVersion = substrate.getLastReadBlipVersion(w.getId(), b.getId());
    assertEquals(blipReadVersion, (int) w.getVersion());
View Full Code Here

  }

  public void testParticipantReadStateWithBlip() {
    WaveletBasedConversation c = setUpWithWaveModel();
    ObservableConversationThread t = c.getRootThread();
    ConversationBlip b = t.appendBlip();

    supplement.markParticipantAsRead(c.getWavelet());
  }

  public void testParticipantReadStateAffectedByWaveletReadState() {
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.