Package com.alexgilleran.icesoap.xml

Examples of com.alexgilleran.icesoap.xml.XMLParentNode


  @Override
  protected XMLParentNodeImpl constructElement(String namespace, String name) {
    XMLParentNodeImpl baseNode = new XMLParentNodeImpl(namespace, name);

    XMLParentNode node1 = baseNode.addNode(NAMESPACE_NODE_1, NAME_NODE_1);
    node1.addNode(NAMESPACE_NODE_2, NAME_NODE_2);

    baseNode.addTextNode(NAMESPACE_TEXT_NODE, NAME_TEXT_NODE, VALUE_TEXT_NODE);

    return baseNode;
  }
View Full Code Here


    List<XMLElement> baseNodeElements = getXMLObject().getChildNodes();

    assertEquals(2, baseNodeElements.size());

    assertTrue(XMLParentNode.class.isAssignableFrom(baseNodeElements.get(0).getClass()));
    XMLParentNode node1 = (XMLParentNode) baseNodeElements.get(0);
    assertEquals(NAME_NODE_1, node1.getName());
    assertEquals(NAMESPACE_NODE_1, node1.getNamespace());

    List<XMLElement> node1SubElements = node1.getChildNodes();
    assertEquals(1, node1SubElements.size());
    assertTrue(XMLParentNode.class.isAssignableFrom(node1SubElements.get(0).getClass()));
    XMLParentNode node2 = (XMLParentNode) node1SubElements.get(0);
    assertEquals(NAME_NODE_2, node2.getName());
    assertEquals(NAMESPACE_NODE_2, node2.getNamespace());

    assertTrue(XMLTextNode.class.isAssignableFrom(baseNodeElements.get(1).getClass()));
    XMLTextNode textElement = (XMLTextNode) baseNodeElements.get(1);
    assertEquals(NAME_TEXT_NODE, textElement.getName());
    assertEquals(NAMESPACE_TEXT_NODE, textElement.getNamespace());
View Full Code Here

TOP

Related Classes of com.alexgilleran.icesoap.xml.XMLParentNode

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.