Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdatadeletedataexceedslength Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 characterdatadeletedataexceedslength (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 used in the "deleteData(offset,count) method is greater than the length of the character data then all the characters from the offset to the end of the data are deleted.

Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=4 and count=50. The method should delete the characters from position 4 to the end of the data since the offset+count(50+4) is greater than the length of the character data(35). The new value of the character data should be "1230".

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-7C603781

Definition at line 51 of file characterdatadeletedataexceedslength.java.


Constructor & Destructor Documentation

characterdatadeletedataexceedslength::characterdatadeletedataexceedslength DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 53 of file characterdatadeletedataexceedslength.java.

00054  {
00055       super(factory);
00056 
00057    }


Member Function Documentation

String characterdatadeletedataexceedslength::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 74 of file characterdatadeletedataexceedslength.java.

00074                                 {
00075       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatadeletedataexceedslength";
00076    }

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

Definition at line 77 of file characterdatadeletedataexceedslength.java.

References DOMTestCase::doMain().

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

void characterdatadeletedataexceedslength::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 59 of file characterdatadeletedataexceedslength.java.

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

00059                                                     {
00060       Document doc;
00061       NodeList elementList;
00062       Node nameNode;
00063       CharacterData child;
00064       String childData;
00065       doc = load("staff");
00066       elementList = doc.getElementsByTagName("address");
00067       nameNode = elementList.item(0);
00068       child = (CharacterData)nameNode.getFirstChild();
00069       child.deleteData(4,50);
00070       childData = child.getData();
00071       assertEquals("characterdataDeleteDataExceedsLengthAssert","1230",childData);
00072       
00073    }


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