Public Methods | |
| namednodemapsetnameditemwithnewvalue (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. Once the list is created the "setNamedItem(arg)" method is invoked with arg=newAttr, where newAttr is a newly created Attr Node and whose node name already exists in the map. The "setNamedItem(arg)" method should add the new node and return null. This test uses the "createAttribute(name)" method from the document interface.
Definition at line 51 of file namednodemapsetnameditemwithnewvalue.java.
|
|
Definition at line 53 of file namednodemapsetnameditemwithnewvalue.java.
00054 {
00055 super(factory);
00056
00057 }
|
|
|
Reimplemented from DOMTest. Definition at line 75 of file namednodemapsetnameditemwithnewvalue.java.
00075 {
00076 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapsetnameditemwithnewvalue";
00077 }
|
|
|
Definition at line 78 of file namednodemapsetnameditemwithnewvalue.java. References DOMTestCase::doMain().
00078 {
00079 DOMTestCase.doMain(namednodemapsetnameditemwithnewvalue.class,args);
00080 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 59 of file namednodemapsetnameditemwithnewvalue.java. References DOMTestCase::assertNull(), and DOMTest::load().
00059 {
00060 Document doc;
00061 NodeList elementList;
00062 Attr newAttribute;
00063 Node testAddress;
00064 NamedNodeMap attributes;
00065 Node newNode;
00066 doc = load("staff");
00067 elementList = doc.getElementsByTagName("address");
00068 testAddress = elementList.item(2);
00069 newAttribute = doc.createAttribute("district");
00070 attributes = testAddress.getAttributes();
00071 newNode = attributes.setNamedItem(newAttribute);
00072 assertNull("namednodemapSetNamedItemWithNewValueAssert",newNode);
00073
00074 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001