Public Methods | |
| characterdatadeletedataexceedslength (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 "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".
Definition at line 51 of file characterdatadeletedataexceedslength.java.
|
|
Definition at line 53 of file characterdatadeletedataexceedslength.java.
00054 {
00055 super(factory);
00056
00057 }
|
|
|
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 }
|
|
|
Definition at line 77 of file characterdatadeletedataexceedslength.java. References DOMTestCase::doMain().
00077 {
00078 DOMTestCase.doMain(characterdatadeletedataexceedslength.class,args);
00079 }
|
|
|
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 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001