Public Methods | |
| elementsetattributenodenull (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the last child of the third employee and add a new attribute to it. The new attribute node added is "district", which is not part of this Element. The method should return the null value. This test uses the "createAttribute(name)" method from the Document interface.
Definition at line 48 of file elementsetattributenodenull.java.
|
|
Definition at line 50 of file elementsetattributenodenull.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
Reimplemented from DOMTest. Definition at line 70 of file elementsetattributenodenull.java.
00070 {
00071 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementsetattributenodenull";
00072 }
|
|
|
Definition at line 73 of file elementsetattributenodenull.java. References DOMTestCase::doMain().
00073 {
00074 DOMTestCase.doMain(elementsetattributenodenull.class,args);
00075 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 56 of file elementsetattributenodenull.java. References DOMTestCase::assertNull(), and DOMTest::load().
00056 {
00057 Document doc;
00058 NodeList elementList;
00059 Element testEmployee;
00060 Attr newAttribute;
00061 Attr districtAttr;
00062 doc = load("staff");
00063 elementList = doc.getElementsByTagName("address");
00064 testEmployee = (Element)elementList.item(2);
00065 newAttribute = doc.createAttribute("district");
00066 districtAttr = testEmployee.setAttributeNode(newAttribute);
00067 assertNull("elementSetAttributeNodeNullAssert",districtAttr);
00068
00069 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001