Public Methods | |
| elementnotfounderr (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the last employee and attempt to remove a non existing attribute node. This should cause the intended exception to be raised. This test makes use of the "createAttribute(name)" method from the Document interface.
Definition at line 49 of file elementnotfounderr.java.
|
|
Definition at line 51 of file elementnotfounderr.java.
00052 {
00053 super(factory);
00054
00055 }
|
|
|
Reimplemented from DOMTest. Definition at line 81 of file elementnotfounderr.java.
00081 {
00082 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementnotfounderr";
00083 }
|
|
|
Definition at line 84 of file elementnotfounderr.java. References DOMTestCase::doMain().
00084 {
00085 DOMTestCase.doMain(elementnotfounderr.class,args);
00086 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 57 of file elementnotfounderr.java. References DOMTestCase::assertTrue(), and DOMTest::load().
00057 {
00058 Document doc;
00059 Attr oldAttribute;
00060 NodeList addressElementList;
00061 Element testAddress;
00062 Attr attrAddress;
00063 doc = load("staff");
00064 addressElementList = doc.getElementsByTagName("address");
00065 testAddress = (Element)addressElementList.item(4);
00066 oldAttribute = doc.createAttribute("oldAttribute");
00067
00068 {
00069 boolean success = false;
00070 try {
00071 attrAddress = testAddress.removeAttributeNode(oldAttribute);
00072
00073 }
00074 catch(DOMException ex) {
00075 success = (ex.code == DOMException.NOT_FOUND_ERR);
00076 }
00077 assertTrue("elementNotFoundErrAssert",success);
00078 }
00079
00080 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001