Public Methods | |
| nodeclonenodefalse (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the second employee and invoke the "cloneNode(deep)" method with deep=false. The method should only clone this node. The NodeName and length of the NodeList are checked. The "getNodeName()" method should return "employee" and the "getLength()" method should return 0.
Definition at line 47 of file nodeclonenodefalse.java.
|
|
Definition at line 49 of file nodeclonenodefalse.java.
00050 {
00051 super(factory);
00052
00053 }
|
|
|
Reimplemented from DOMTest. Definition at line 74 of file nodeclonenodefalse.java.
00074 {
00075 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeclonenodefalse";
00076 }
|
|
|
Definition at line 77 of file nodeclonenodefalse.java. References DOMTestCase::doMain().
00077 {
00078 DOMTestCase.doMain(nodeclonenodefalse.class,args);
00079 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 55 of file nodeclonenodefalse.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00055 {
00056 Document doc;
00057 NodeList elementList;
00058 Node employeeNode;
00059 Node clonedNode;
00060 String cloneName;
00061 NodeList cloneChildren;
00062 int length;
00063 doc = load("staff");
00064 elementList = doc.getElementsByTagName("employee");
00065 employeeNode = elementList.item(1);
00066 clonedNode = employeeNode.cloneNode(false);
00067 cloneName = clonedNode.getNodeName();
00068 assertEquals("name","employee",cloneName);
00069 cloneChildren = clonedNode.getChildNodes();
00070 length = (int)cloneChildren.getLength();
00071 assertEquals("length",0,length);
00072
00073 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001