/** * enqueues the given runnable * * @param runnable a runnable */ protected void invokeLater(Runnable runnable) { if (runnable != null) { queue.add(runnable); } }
/** * Runs the test case. * * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elementList; Node employeeNode; Node childNode; NodeList childNodes; int nodeType; String childName; java.util.List actual = new java.util.ArrayList(); java.util.List expected = new java.util.ArrayList(); expected.add("em"); expected.add("strong"); expected.add("code"); expected.add("sup"); expected.add("var"); expected.add("acronym"); doc = (Document) load("hc_staff", false); elementList = doc.getElementsByTagName("p"); employeeNode = elementList.item(1); childNodes = employeeNode.getChildNodes(); for (int indexN1006C = 0; indexN1006C < childNodes.getLength(); indexN1006C++) { childNode = (Node) childNodes.item(indexN1006C); nodeType = (int) childNode.getNodeType(); childName = childNode.getNodeName(); if (equals(1, nodeType)) { actual.add(childName); } else { assertEquals("textNodeType", 3, nodeType); } } assertEqualsAutoCase("element", "elementNames", expected, actual); }