Package org.apache.wookie.w3c.updates

Examples of org.apache.wookie.w3c.updates.UpdateDescriptionDocument.fromXML()


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


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

  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);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void badNamespaceDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
View Full Code Here

  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);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void missingVersionAttrDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
View Full Code Here

    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);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void missingSrcAttrDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
View Full Code Here

    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);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void invalidSrcAttrDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
View Full Code Here

    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);
  }
 
  @Test
  public void validDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
View Full Code Here

    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

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

  }
 
  @Test (expected=InvalidUDDException.class)
  public void nullDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, null);
    udd.fromXML(null);
  }
 
  @Test (expected=InvalidUDDException.class)
  public void invalidRootDocument() throws InvalidUDDException{
    UpdateDescriptionDocument udd = new UpdateDescriptionDocument(null, null, 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.