Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

commentgetcomment Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

A comment is all the characters between the starting '' Retrieve the nodes of the DOM document. Search for a comment node and the content is its value.

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

Definition at line 45 of file commentgetcomment.java.


Constructor & Destructor Documentation

commentgetcomment::commentgetcomment DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 47 of file commentgetcomment.java.

00048  {
00049       super(factory);
00050 
00051    }


Member Function Documentation

String commentgetcomment::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 82 of file commentgetcomment.java.

00082                                 {
00083       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/commentgetcomment";
00084    }

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

Definition at line 85 of file commentgetcomment.java.

References DOMTestCase::doMain().

00085                                           {
00086         DOMTestCase.doMain(commentgetcomment.class,args);
00087    }

void commentgetcomment::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 53 of file commentgetcomment.java.

References DOMTestCase::assertEquals(), DOMTestCase::equals(), and DOMTest::load().

00053                                                     {
00054       Document doc;
00055       NodeList elementList;
00056       Node child;
00057       String childName;
00058       String childValue;
00059       int commentCount = 0;
00060       int childType;
00061       doc = load("staff");
00062       elementList = doc.getChildNodes();
00063       for(int _index = 0; _index < elementList.getLength();_index++) {
00064       child = ( Node ) elementList.item(_index);
00065            childType = (int)child.getNodeType();
00066       
00067         if(
00068         equals(8,childType)
00069         ) {
00070         childName = child.getNodeName();
00071       assertEquals("nodeName","#comment",childName);
00072       childValue = child.getNodeValue();
00073       assertEquals("nodeValue"," This is comment number 1.",childValue);
00074       commentCount = commentCount + 1;
00075 
00076         }
00077         
00078         }
00079       assertEquals("commentCount",1,commentCount);
00080       
00081    }


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