Examples of toXMLString()


Examples of org.waveprotocol.wave.model.document.ObservableDocument.toXmlString()

  public void testIdWithNoDomain() throws InvalidIdException {
    String attachmentId = "some-id";
    createAttachmentDataDoc(attachmentId);
    ObservableDocument attachmentDataDoc =
        AttachmentDataDocHelper.getAttachmentDataDoc(wavelet, attachmentId);
    assertEquals(DATA_DOC_CONTENT, attachmentDataDoc.toXmlString());
  }

  /**
   * Test case where no match can be found.
   *
 
View Full Code Here

Examples of org.waveprotocol.wave.model.document.ObservableDocument.toXmlString()

   */
  public void testIdNotFound() throws InvalidIdException {
    String attachmentId = "domain.com/some-id";
    ObservableDocument attachmentDataDoc =
        AttachmentDataDocHelper.getAttachmentDataDoc(wavelet, attachmentId);
    assertEquals(EMPTY_DATA_DOC, attachmentDataDoc.toXmlString());
  }

  /**
   * Test case where a null attachment id is requested.
   *
 
View Full Code Here

Examples of org.waveprotocol.wave.model.document.ObservableDocument.toXmlString()

  public void testOnlyPersistsChangedRole() {
    ObservableDocument doc = BasicFactories.observableDocumentProvider().parse("");
    DocumentBasedRoles permissions = DocumentBasedRoles.create(doc);
    permissions.assign(p("public@a.gwave.com"), Role.READ_ONLY);
    assertEquals("<assign address=\"public@a.gwave.com\" role=\"READ_ONLY\"/>", doc.toXmlString());
  }

  public void testPersistNothingWhenSettingDefaultRole() {
    ObservableDocument doc = BasicFactories.observableDocumentProvider().parse("");
    DocumentBasedRoles permissions = DocumentBasedRoles.create(doc);
View Full Code Here

Examples of org.waveprotocol.wave.model.document.ObservableDocument.toXmlString()

  public void testPersistNothingWhenSettingDefaultRole() {
    ObservableDocument doc = BasicFactories.observableDocumentProvider().parse("");
    DocumentBasedRoles permissions = DocumentBasedRoles.create(doc);
    permissions.assign(p("joe@example.com"), Role.FULL);
    assertEquals("", doc.toXmlString());
  }

  @Override
  protected ObservableRoles getRoles() {
    ObservableDocument doc = BasicFactories.observableDocumentProvider().parse("");
View Full Code Here

Examples of org.waveprotocol.wave.model.document.ObservableDocument.toXmlString()

        "<node key=\"filename\" value=\"CIMG0217.JPG\"></node>" +
        "<node key=\"thumbnail_url\" value=\"/thumbnail/CIMG0217_thumb.jpg?id=xJFILMDj3&amp;" +
            "key=AH0qf5woLURO3-CemfDebYFaWA9fD3PMuA\"></node>" +
        "<node key=\"attachment_url\" value=\"" + ATTACHMENT_URL + "\"></node>";
    ObservableDocument document = mock(ObservableDocument.class);
    when(document.toXmlString()).thenReturn(xmlString);

    Wavelet wavelet = mock(Wavelet.class);
    when(wavelet.getDocument("attach+" + attachmentId)).thenReturn(document);
    return wavelet;
  }
View Full Code Here

Examples of org.zeroturnaround.jrebel.gradle.model.RebelMainModel.toXmlString()

   
    // TODO very rough test that doesn't actually validate almost anything... just make sure the code runs through
    // TODO make it test the real requirements more thoroughly
    assertTrue(webResources.size() > 0);
   
    log.info("testWeb() XML :  \n" + model.toXmlString());
   
    cleanUp(project);
  }
 
  // TODO tests for other properties -- what should the model look like after setting those config options
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.