Package org.apache.wookie.w3c.impl

Examples of org.apache.wookie.w3c.impl.AccessEntity


 
  @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());
  }
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());
  }
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());
  }
View Full Code Here

  @Test
  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

Related Classes of org.apache.wookie.w3c.impl.AccessEntity

Copyright © 2018 www.massapicom. 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.