Public Methods | |
| characterdatareplacedataexceedslengthofdata (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
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.
Definition at line 48 of file characterdatareplacedataexceedslengthofdata.java.
|
|
Definition at line 50 of file characterdatareplacedataexceedslengthofdata.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
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 }
|
|
|
Definition at line 74 of file characterdatareplacedataexceedslengthofdata.java. References DOMTestCase::doMain().
00074 {
00075 DOMTestCase.doMain(characterdatareplacedataexceedslengthofdata.class,args);
00076 }
|
|
|
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 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001