Package org.apache.wookie.w3c.impl

Examples of org.apache.wookie.w3c.impl.AccessEntity.fromXML()


  @Test
  public void badOriginHasFragment(){
    Element element = new Element("access");
    element.setAttribute("origin","http://www.apache.org#1");
    AccessEntity accessEntity = new AccessEntity();
    accessEntity.fromXML(element);
    assertEquals(null,accessEntity.getOrigin());
  }
 
  @Test
  public void badOriginHasQuery(){
View Full Code Here


  @Test
  public void badOriginHasQuery(){
    Element element = new Element("access");
    element.setAttribute("origin","http://www.apache.org?q=test");
    AccessEntity accessEntity = new AccessEntity();
    accessEntity.fromXML(element);
    assertEquals(null,accessEntity.getOrigin());
  }
 
  @Test
  public void badOriginHasUnsupportedScheme(){
View Full Code Here

  @Test
  public void badOriginHasUnsupportedScheme(){
    Element element = new Element("access");
    element.setAttribute("origin","ftp://www.apache.org");
    AccessEntity accessEntity = new AccessEntity();
    accessEntity.fromXML(element);
    assertEquals(null,accessEntity.getOrigin());
  }
 
  @Test
  public void xmlOutput(){
View Full Code Here

  public void xmlOutput(){
    Element element = new Element("access");
    element.setAttribute("origin","http://apache.org");
    element.setAttribute("subdomains","true");
    AccessEntity accessEntity = new AccessEntity();
    accessEntity.fromXML(element);
    Element outputElement = accessEntity.toXml();
    assertEquals("http://apache.org:80",outputElement.getAttributeValue("origin"));
  }
}
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.