Public Methods | |
| namednodemapreturnlastitem (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Since the DOM does not specify an order of these nodes the contents of the LAST node can contain either "domestic" or "street". The test should return "true" if the LAST node is either of these values.
Definition at line 47 of file namednodemapreturnlastitem.java.
|
|
Definition at line 49 of file namednodemapreturnlastitem.java.
00050 {
00051 super(factory);
00052
00053 }
|
|
|
Reimplemented from DOMTest. Definition at line 74 of file namednodemapreturnlastitem.java.
00074 {
00075 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapreturnlastitem";
00076 }
|
|
|
Definition at line 77 of file namednodemapreturnlastitem.java. References DOMTestCase::doMain().
00077 {
00078 DOMTestCase.doMain(namednodemapreturnlastitem.class,args);
00079 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 55 of file namednodemapreturnlastitem.java. References DOMTestCase::assertTrue(), DOMTestCase::equals(), and DOMTest::load().
00055 {
00056 Document doc;
00057 NodeList elementList;
00058 Node testEmployee;
00059 NamedNodeMap attributes;
00060 Node child;
00061 String name;
00062 doc = load("staff");
00063 elementList = doc.getElementsByTagName("address");
00064 testEmployee = elementList.item(1);
00065 attributes = testEmployee.getAttributes();
00066 child = attributes.item(1);
00067 name = child.getNodeName();
00068 assertTrue("namednodemapReturnLastItemAssert",
00069
00070 (equals("domestic",name) | equals("street",name))
00071 );
00072
00073 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001