Package org.structr.web.entity.html

Examples of org.structr.web.entity.html.Div


      final List<Div> divs = collectNodes(nodes, Div.class);

      assertEquals("Wrong number of divs returned from node query", 4, divs.size());

      // check first div, should have no siblings and one child
      final Div firstDiv = divs.get(0);
      assertEquals("Wrong number of children", 1, firstDiv.getChildRelationships().size());
      assertNull("Node should not have siblings", firstDiv.getNextSibling());

      // check second div, should have no siblings and two children
      final Div secondDiv = divs.get(1);
      assertEquals("Wrong number of children", 2, secondDiv.getChildRelationships().size());
      assertNull("Node should not have siblings", secondDiv.getNextSibling());

      // check third div, should have one sibling and one #text child
      final Div thirdDiv = divs.get(2);
      assertEquals("Wrong number of children", 1, thirdDiv.getChildRelationships().size());
      assertNotNull("Node should have one sibling", thirdDiv.getNextSibling());

      // check fourth div, should have no siblings and no children
      final Div fourthDiv = divs.get(3);
      assertEquals("Wrong number of children", 0, fourthDiv.getChildRelationships().size());
      assertNull("Node should not have siblings", fourthDiv.getNextSibling());




View Full Code Here

TOP

Related Classes of org.structr.web.entity.html.Div

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.