Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdatareplacedataexceedslengthofdata Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

If the sum of the offset and count exceeds the length then all the characters to the end of the data are replaced.

Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=0 and count=50 and arg="2600". The method should replace all the characters with "2600". This is because the sum of the offset and count exceeds the length of the character data.

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

Definition at line 48 of file characterdatareplacedataexceedslengthofdata.java.


Constructor & Destructor Documentation

characterdatareplacedataexceedslengthofdata::characterdatareplacedataexceedslengthofdata DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 50 of file characterdatareplacedataexceedslengthofdata.java.

00051  {
00052       super(factory);
00053 
00054    }


Member Function Documentation

String characterdatareplacedataexceedslengthofdata::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 71 of file characterdatareplacedataexceedslengthofdata.java.

00071                                 {
00072       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatareplacedataexceedslengthofdata";
00073    }

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

Definition at line 74 of file characterdatareplacedataexceedslengthofdata.java.

References DOMTestCase::doMain().

00074                                           {
00075         DOMTestCase.doMain(characterdatareplacedataexceedslengthofdata.class,args);
00076    }

void characterdatareplacedataexceedslengthofdata::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 56 of file characterdatareplacedataexceedslengthofdata.java.

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

00056                                                     {
00057       Document doc;
00058       NodeList elementList;
00059       Node nameNode;
00060       CharacterData child;
00061       String childData;
00062       doc = load("staff");
00063       elementList = doc.getElementsByTagName("address");
00064       nameNode = elementList.item(0);
00065       child = (CharacterData)nameNode.getFirstChild();
00066       child.replaceData(0,50,"2600");
00067       childData = child.getData();
00068       assertEquals("characterdataReplaceDataExceedsLengthOfDataAssert","2600",childData);
00069       
00070    }


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