Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

documentcreatecomment Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "createComment(data)" method creates a new Comment node given the specified string. Retrieve the entire DOM document and invoke its "createComment(data)" method. It should create a new Comment node whose "data" is the specified string. The content, name and type are retrieved and output.

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

Definition at line 44 of file documentcreatecomment.java.


Constructor & Destructor Documentation

documentcreatecomment::documentcreatecomment DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 46 of file documentcreatecomment.java.

00047  {
00048       super(factory);
00049 
00050    }


Member Function Documentation

String documentcreatecomment::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 68 of file documentcreatecomment.java.

00068                                 {
00069       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentcreatecomment";
00070    }

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

Definition at line 71 of file documentcreatecomment.java.

References DOMTestCase::doMain().

00071                                           {
00072         DOMTestCase.doMain(documentcreatecomment.class,args);
00073    }

void documentcreatecomment::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 52 of file documentcreatecomment.java.

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

00052                                                     {
00053       Document doc;
00054       Comment newCommentNode;
00055       String newCommentValue;
00056       String newCommentName;
00057       int newCommentType;
00058       doc = load("staff");
00059       newCommentNode = doc.createComment("This is a new Comment node");
00060       newCommentValue = newCommentNode.getNodeValue();
00061       assertEquals("value","This is a new Comment node",newCommentValue);
00062       newCommentName = newCommentNode.getNodeName();
00063       assertEquals("name","#comment",newCommentName);
00064       newCommentType = (int)newCommentNode.getNodeType();
00065       assertEquals("type",8,newCommentType);
00066       
00067    }


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