@Test public void getLastNamedChildNode() { assertEquals("two", DomUtil.getLastNamedChildNode(root, "element").getTextContent()); assertEquals("not real", DomUtil.getLastNamedChildNode(root, "other").getTextContent()); assertNull("Did not return null for missing element.", DomUtil.getLastNamedChildNode(root, "fake")); }
@Test public void getLastNamedChildNode() { assertEquals("two", DomUtil.getLastNamedChildNode(root, "element").getTextContent()); assertEquals("not real", DomUtil.getLastNamedChildNode(root, "other").getTextContent()); assertNull("Did not return null for missing element.", DomUtil.getLastNamedChildNode(root, "fake")); }
@Test public void getLastNamedChildNode() throws Exception { Element root = XmlUtil.parse(XML); assertTrue(DomUtil.getLastNamedChildNode(root, "element") != null); assertEquals("two", DomUtil.getLastNamedChildNode(root, "element").getTextContent()); assertEquals("not real", DomUtil.getLastNamedChildNode(root, "other").getTextContent()); assertNull("Did not return null for missing element.", DomUtil.getLastNamedChildNode(root, "fake")); }
@Test public void getLastNamedChildNode() throws Exception { Element root = XmlUtil.parse(XML); assertTrue(DomUtil.getLastNamedChildNode(root, "element") != null); assertEquals("two", DomUtil.getLastNamedChildNode(root, "element").getTextContent()); assertEquals("not real", DomUtil.getLastNamedChildNode(root, "other").getTextContent()); assertNull("Did not return null for missing element.", DomUtil.getLastNamedChildNode(root, "fake")); }
@Test public void getLastNamedChildNode() throws Exception { Element root = XmlUtil.parse(XML); assertTrue(DomUtil.getLastNamedChildNode(root, "element") != null); assertEquals("two", DomUtil.getLastNamedChildNode(root, "element").getTextContent()); assertEquals("not real", DomUtil.getLastNamedChildNode(root, "other").getTextContent()); assertNull("Did not return null for missing element.", DomUtil.getLastNamedChildNode(root, "fake")); }