Examples of UpdateDescriptionDocument


Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    udd.fromXML(doc);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void nullDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
    udd.fromXML(null);
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    udd.fromXML(null);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void invalidRootDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
    Document doc = new Document();
    Element el = new Element("update", IW3CXMLConfiguration.MANIFEST_NAMESPACE);
    doc.setRootElement(el);
    udd.fromXML(doc);
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    udd.fromXML(doc);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void badNamespaceDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
    Document doc = new Document();
    Element el = new Element("update-info", "http://bogus.net");
    doc.setRootElement(el);
    udd.fromXML(doc);
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    udd.fromXML(doc);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void missingVersionAttrDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
    Document doc = new Document();
    Element el = new Element("update-info", IW3CXMLConfiguration.MANIFEST_NAMESPACE);
    el.setAttribute("src","http://incubator.apache.org/wookie");
    doc.setRootElement(el);
    udd.fromXML(doc);
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    udd.fromXML(doc);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void missingSrcAttrDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
    Document doc = new Document();
    Element el = new Element("update-info", IW3CXMLConfiguration.MANIFEST_NAMESPACE);
    el.setAttribute("version","1.0");
    doc.setRootElement(el);
    udd.fromXML(doc);
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    udd.fromXML(doc);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void invalidSrcAttrDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
    Document doc = new Document();
    Element el = new Element("update-info", IW3CXMLConfiguration.MANIFEST_NAMESPACE);
    el.setAttribute("version","1.0");
    el.setAttribute("src","!notavaliduri");
    doc.setRootElement(el);
    udd.fromXML(doc);
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    udd.fromXML(doc);
  }
 
  @Test
  public void validDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
    Document doc = new Document();
    Element el = new Element("update-info", IW3CXMLConfiguration.MANIFEST_NAMESPACE);
    el.setAttribute("version","1.0");
    el.setAttribute("src","http://incubator.apache.org/wookie/test.wgt");
    Element details = new Element("details", IW3CXMLConfiguration.MANIFEST_NAMESPACE);
    details.setText("test");
    el.addContent(details);
    doc.setRootElement(el);
    udd.fromXML(doc);
    assertEquals("1.0", udd.getVersionTag());
    assertEquals("http://incubator.apache.org/wookie/test.wgt", udd.getUpdateSource().toString());
    assertEquals("test", udd.getDetails("en"));
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    assertEquals("test", udd.getDetails("en"));
  }
 
  @Test
  public void validRemoteDocument() throws InvalidUDDException, IOException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument("http://svn.apache.org/repos/asf/incubator/wookie/trunk/parser/java/src-test/update.xml");
    assertEquals("1.0", udd.getVersionTag());
    assertEquals("http://incubator.apache.org/wookie/test.wgt", udd.getUpdateSource().toString());
    assertEquals("test", udd.getDetails("en"));
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    assertEquals("test", udd.getDetails("en"));
  }
 
  @Test (expected = InvalidUDDException.class)
  public void missingRemoteDocument() throws InvalidUDDException, IOException{
    new UpdateDescriptionDocument("http://incubator.apache.org/wookie/nosuchdoc");
  }
View Full Code Here

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument

    new UpdateDescriptionDocument("http://incubator.apache.org/wookie/nosuchdoc");
  }
 
  @Test (expected = InvalidUDDException.class)
  public void invalidRemoteDocument() throws InvalidUDDException, IOException{
    new UpdateDescriptionDocument("http://incubator.apache.org/wookie/index.data/wookie-overview-sm.png");
  }
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.