Public Methods | |
| elementaddnewattribute (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the last child of the last employee, then add an attribute to it by invoking the "setAttribute(name,value)" method. It should create a "name" attribute with an assigned value equal to "value".
Definition at line 46 of file elementaddnewattribute.java.
|
|
Definition at line 48 of file elementaddnewattribute.java.
00049 {
00050 super(factory);
00051
00052 }
|
|
|
Reimplemented from DOMTest. Definition at line 67 of file elementaddnewattribute.java.
00067 {
00068 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementaddnewattribute";
00069 }
|
|
|
Definition at line 70 of file elementaddnewattribute.java. References DOMTestCase::doMain().
00070 {
00071 DOMTestCase.doMain(elementaddnewattribute.class,args);
00072 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 54 of file elementaddnewattribute.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00054 {
00055 Document doc;
00056 NodeList elementList;
00057 Element testEmployee;
00058 String attrValue;
00059 doc = load("staff");
00060 elementList = doc.getElementsByTagName("address");
00061 testEmployee = (Element)elementList.item(4);
00062 testEmployee.setAttribute("district","dallas");
00063 attrValue = testEmployee.getAttribute("district");
00064 assertEquals("elementAddNewAttributeAssert","dallas",attrValue);
00065
00066 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001