Public Methods | |
| namednodemapnotfounderr (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Create a NamedNodeMap object from the attributes of the last child of the third employee and attempt to remove the "district" attribute. There is not a node named "district" in the list and therefore the desired exception should be raised.
Definition at line 49 of file namednodemapnotfounderr.java.
|
|
Definition at line 51 of file namednodemapnotfounderr.java.
00052 {
00053 super(factory);
00054
00055 }
|
|
|
Reimplemented from DOMTest. Definition at line 81 of file namednodemapnotfounderr.java.
00081 {
00082 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapnotfounderr";
00083 }
|
|
|
Definition at line 84 of file namednodemapnotfounderr.java. References DOMTestCase::doMain().
00084 {
00085 DOMTestCase.doMain(namednodemapnotfounderr.class,args);
00086 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 57 of file namednodemapnotfounderr.java. References DOMTestCase::assertTrue(), and DOMTest::load().
00057 {
00058 Document doc;
00059 NodeList elementList;
00060 Element testEmployee;
00061 NamedNodeMap attributes;
00062 Node removedNode;
00063 doc = load("staff");
00064 elementList = doc.getElementsByTagName("address");
00065 testEmployee = (Element)elementList.item(2);
00066 attributes = testEmployee.getAttributes();
00067
00068 {
00069 boolean success = false;
00070 try {
00071 removedNode = attributes.removeNamedItem("district");
00072
00073 }
00074 catch(DOMException ex) {
00075 success = (ex.code == DOMException.NOT_FOUND_ERR);
00076 }
00077 assertTrue("throw_NOT_FOUND_ERR",success);
00078 }
00079
00080 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001