Public Methods | |
| nodeappendchildchildexists (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the first child of the second employee and append the first child to the end of the list. After the "appendChild(newChild)" method is invoked the first child should be the one that was second and the last child should be the one that was first.
Definition at line 46 of file nodeappendchildchildexists.java.
|
|
Definition at line 48 of file nodeappendchildchildexists.java.
00049 {
00050 super(factory);
00051
00052 }
|
|
|
Reimplemented from DOMTest. Definition at line 89 of file nodeappendchildchildexists.java.
00089 {
00090 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeappendchildchildexists";
00091 }
|
|
|
Definition at line 92 of file nodeappendchildchildexists.java. References DOMTestCase::doMain().
00092 {
00093 DOMTestCase.doMain(nodeappendchildchildexists.class,args);
00094 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 54 of file nodeappendchildchildexists.java. References DOMTestCase::assertEquals(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
00054 {
00055 Document doc;
00056 NodeList elementList;
00057 Node childNode;
00058 Node newChild;
00059 Node lchild;
00060 Node fchild;
00061 String lchildName;
00062 String fchildName;
00063 Node appendedChild;
00064 doc = load("staff");
00065 elementList = doc.getElementsByTagName("employee");
00066 childNode = elementList.item(1);
00067 newChild = childNode.getFirstChild();
00068 appendedChild = childNode.appendChild(newChild);
00069 fchild = childNode.getFirstChild();
00070 fchildName = fchild.getNodeName();
00071 lchild = childNode.getLastChild();
00072 lchildName = lchild.getNodeName();
00073
00074 if(
00075 isIgnoringElementContentWhitespace()
00076 ) {
00077 assertEquals("assert1_nowhitespace","name",fchildName);
00078 assertEquals("assert2_nowhitespace","employeeId",lchildName);
00079
00080 }
00081
00082 else {
00083 assertEquals("assert1","employeeId",fchildName);
00084 assertEquals("assert2","#text",lchildName);
00085
00086 }
00087
00088 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001