Public Methods | |
| characterdataappenddata (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the character data from the second child of the first employee. The appendData(arg) method is called with arg=", Esquire". The method should append the specified data to the already existing character data. The new value return by the "getLength()" method should be 24.
Definition at line 48 of file characterdataappenddata.java.
|
|
Definition at line 50 of file characterdataappenddata.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
Reimplemented from DOMTest. Definition at line 73 of file characterdataappenddata.java.
00073 {
00074 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdataappenddata";
00075 }
|
|
|
Definition at line 76 of file characterdataappenddata.java. References DOMTestCase::doMain().
00076 {
00077 DOMTestCase.doMain(characterdataappenddata.class,args);
00078 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 56 of file characterdataappenddata.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00056 {
00057 Document doc;
00058 NodeList elementList;
00059 Node nameNode;
00060 CharacterData child;
00061 String childValue;
00062 int childLength;
00063 doc = load("staff");
00064 elementList = doc.getElementsByTagName("name");
00065 nameNode = elementList.item(0);
00066 child = (CharacterData)nameNode.getFirstChild();
00067 child.appendData(", Esquire");
00068 childValue = child.getData();
00069 childLength = childValue.length();
00070 assertEquals("characterdataAppendDataAssert",24,childLength);
00071
00072 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001