Public Methods | |
| textsplittextone (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the textual data from the second child of the third employee and invoke the "splitText(offset)" method. The method splits the Text node into two new sibling Text nodes keeping both of them in the tree. This test checks the "nextSibling()" method of the original node to ensure that the two nodes are indeed siblings.
Definition at line 48 of file textsplittextone.java.
|
|
Definition at line 50 of file textsplittextone.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
Reimplemented from DOMTest. Definition at line 74 of file textsplittextone.java.
00074 {
00075 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/textsplittextone";
00076 }
|
|
|
Definition at line 77 of file textsplittextone.java. References DOMTestCase::doMain().
00077 {
00078 DOMTestCase.doMain(textsplittextone.class,args);
00079 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 56 of file textsplittextone.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00056 {
00057 Document doc;
00058 NodeList elementList;
00059 Node nameNode;
00060 Text textNode;
00061 Text splitNode;
00062 Node secondPart;
00063 String value;
00064 doc = load("staff");
00065 elementList = doc.getElementsByTagName("name");
00066 nameNode = elementList.item(2);
00067 textNode = (Text)nameNode.getFirstChild();
00068 splitNode = textNode.splitText(7);
00069 secondPart = textNode.getNextSibling();
00070 value = secondPart.getNodeValue();
00071 assertEquals("textSplitTextOneAssert","Jones",value);
00072
00073 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001