Public Methods | |
| nodeinsertbeforerefchildnull (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the second employee and invoke the "insertBefore(newChild,refChild)" method with refChild=null. Since "refChild" is null the "newChild" should be added to the end of the list. The last item in the list is checked after insertion. The last Element node of the list should be "newChild".
Definition at line 48 of file nodeinsertbeforerefchildnull.java.
|
|
Definition at line 50 of file nodeinsertbeforerefchildnull.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
Reimplemented from DOMTest. Definition at line 78 of file nodeinsertbeforerefchildnull.java.
00078 {
00079 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeinsertbeforerefchildnull";
00080 }
|
|
|
Definition at line 81 of file nodeinsertbeforerefchildnull.java. References DOMTestCase::doMain().
00081 {
00082 DOMTestCase.doMain(nodeinsertbeforerefchildnull.class,args);
00083 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 56 of file nodeinsertbeforerefchildnull.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00056 {
00057 Document doc;
00058 NodeList elementList;
00059 Node employeeNode;
00060 NodeList childList;
00061 Node refChild = null;
00062
00063 Node newChild;
00064 Node child;
00065 String childName;
00066 Node insertedNode;
00067 doc = load("staff");
00068 elementList = doc.getElementsByTagName("employee");
00069 employeeNode = elementList.item(1);
00070 childList = employeeNode.getChildNodes();
00071 newChild = doc.createElement("newChild");
00072 insertedNode = employeeNode.insertBefore(newChild,refChild);
00073 child = employeeNode.getLastChild();
00074 childName = child.getNodeName();
00075 assertEquals("nodeInsertBeforeRefChildNullAssert1","newChild",childName);
00076
00077 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001