Public Methods | |
| nodereplacechildnodename (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Replace the second Element of the second employee with a newly created node Element and check the NodeName returned by the "replaceChild(newChild,oldChild)" method. The returned node should have a NodeName equal to "employeeId".
Definition at line 47 of file nodereplacechildnodename.java.
|
|
Definition at line 49 of file nodereplacechildnodename.java.
00050 {
00051 super(factory);
00052
00053 }
|
|
|
Reimplemented from DOMTest. Definition at line 86 of file nodereplacechildnodename.java.
00086 {
00087 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodereplacechildnodename";
00088 }
|
|
|
Definition at line 89 of file nodereplacechildnodename.java. References DOMTestCase::doMain().
00089 {
00090 DOMTestCase.doMain(nodereplacechildnodename.class,args);
00091 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 55 of file nodereplacechildnodename.java. References DOMTestCase::assertEquals(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
00055 {
00056 Document doc;
00057 NodeList elementList;
00058 Node employeeNode;
00059 NodeList childList;
00060 Node oldChild;
00061 Node newChild;
00062 Node replacedNode;
00063 String childName;
00064 doc = load("staff");
00065 elementList = doc.getElementsByTagName("employee");
00066 employeeNode = elementList.item(1);
00067 childList = employeeNode.getChildNodes();
00068 oldChild = childList.item(1);
00069 newChild = doc.createElement("newChild");
00070 replacedNode = employeeNode.replaceChild(newChild,oldChild);
00071 childName = replacedNode.getNodeName();
00072
00073 if(
00074 isIgnoringElementContentWhitespace()
00075 ) {
00076 assertEquals("nowhitespace","name",childName);
00077
00078 }
00079
00080 else {
00081 assertEquals("whitespace","employeeId",childName);
00082
00083 }
00084
00085 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001