Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

namednodemapreturnlastitem Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 namednodemapreturnlastitem (DOMTestDocumentBuilderFactory factory)
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

The "item(index)" method returns the indexth item in the map(test for last item).

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.

Author:
NIST , Mary Brady
See also:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-349467F9

Definition at line 47 of file namednodemapreturnlastitem.java.


Constructor & Destructor Documentation

namednodemapreturnlastitem::namednodemapreturnlastitem DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 49 of file namednodemapreturnlastitem.java.

00050  {
00051       super(factory);
00052 
00053    }


Member Function Documentation

String namednodemapreturnlastitem::getTargetURI   [inline, virtual]
 

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    }

void namednodemapreturnlastitem::main String    args[] [inline, static]
 

Definition at line 77 of file namednodemapreturnlastitem.java.

References DOMTestCase::doMain().

00077                                           {
00078         DOMTestCase.doMain(namednodemapreturnlastitem.class,args);
00079    }

void namednodemapreturnlastitem::runTest   [inline, virtual]
 

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    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:55 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001