Public Methods | |
| namednodemapsetnameditemreturnvalue (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the third employee and create a NamedNodeMap object from the attributes of the last child by invoking the "getAttributes()" method. Once the list is created an invocation of the "setNamedItem(arg)" method is done with arg=newAttr, where newAttr is a new Attr Node previously created and whose node name already exists in the map. The "setNamedItem(arg)" method should replace the already existing node with the new one and return the existing node. This test uses the "createAttribute(name)" method from the document interface.
Definition at line 54 of file namednodemapsetnameditemreturnvalue.java.
|
|
Definition at line 56 of file namednodemapsetnameditemreturnvalue.java.
00057 {
00058 super(factory);
00059
00060 }
|
|
|
Reimplemented from DOMTest. Definition at line 80 of file namednodemapsetnameditemreturnvalue.java.
00080 {
00081 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapsetnameditemreturnvalue";
00082 }
|
|
|
Definition at line 83 of file namednodemapsetnameditemreturnvalue.java. References DOMTestCase::doMain().
00083 {
00084 DOMTestCase.doMain(namednodemapsetnameditemreturnvalue.class,args);
00085 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 62 of file namednodemapsetnameditemreturnvalue.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00062 {
00063 Document doc;
00064 NodeList elementList;
00065 Attr newAttribute;
00066 Node testAddress;
00067 NamedNodeMap attributes;
00068 Node newNode;
00069 String attrValue;
00070 doc = load("staff");
00071 elementList = doc.getElementsByTagName("address");
00072 testAddress = elementList.item(2);
00073 newAttribute = doc.createAttribute("street");
00074 attributes = testAddress.getAttributes();
00075 newNode = attributes.setNamedItem(newAttribute);
00076 attrValue = newNode.getNodeValue();
00077 assertEquals("namednodemapSetNamedItemReturnValueAssert","No",attrValue);
00078
00079 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001