Public Methods | |
| noderemovechildoldchildnonexistent (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the second employee and attempt to remove a node that is not one of its children. An attempt to remove such a node should raise the desired exception.
Definition at line 48 of file noderemovechildoldchildnonexistent.java.
|
|
Definition at line 50 of file noderemovechildoldchildnonexistent.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
Reimplemented from DOMTest. Definition at line 80 of file noderemovechildoldchildnonexistent.java.
00080 {
00081 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/noderemovechildoldchildnonexistent";
00082 }
|
|
|
Definition at line 83 of file noderemovechildoldchildnonexistent.java. References DOMTestCase::doMain().
00083 {
00084 DOMTestCase.doMain(noderemovechildoldchildnonexistent.class,args);
00085 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 56 of file noderemovechildoldchildnonexistent.java. References DOMTestCase::assertTrue(), and DOMTest::load().
00056 {
00057 Document doc;
00058 Node oldChild;
00059 NodeList elementList;
00060 Node elementNode;
00061 Node removedChild;
00062 doc = load("staff");
00063 oldChild = doc.createElement("oldChild");
00064 elementList = doc.getElementsByTagName("employee");
00065 elementNode = elementList.item(1);
00066
00067 {
00068 boolean success = false;
00069 try {
00070 removedChild = elementNode.removeChild(oldChild);
00071
00072 }
00073 catch(DOMException ex) {
00074 success = (ex.code == DOMException.NOT_FOUND_ERR);
00075 }
00076 assertTrue("nodeRemoveChildOldChildNonexistentAssert1",success);
00077 }
00078
00079 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001