Public Methods | |
| nodecommentnodevalue (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the comment in the XML file and check the string returned by the "getNodeValue()" method. It should be equal to "This is comment number 1".
Definition at line 45 of file nodecommentnodevalue.java.
|
|
Definition at line 47 of file nodecommentnodevalue.java.
00048 {
00049 super(factory);
00050
00051 }
|
|
|
Reimplemented from DOMTest. Definition at line 76 of file nodecommentnodevalue.java.
00076 {
00077 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodecommentnodevalue";
00078 }
|
|
|
Definition at line 79 of file nodecommentnodevalue.java. References DOMTestCase::doMain().
00079 {
00080 DOMTestCase.doMain(nodecommentnodevalue.class,args);
00081 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 53 of file nodecommentnodevalue.java. References DOMTestCase::assertEquals(), DOMTestCase::equals(), and DOMTest::load().
00053 {
00054 Document doc;
00055 NodeList elementList;
00056 Node commentNode;
00057 String commentName;
00058 String commentValue;
00059 doc = load("staff");
00060 elementList = doc.getChildNodes();
00061 for(int _index = 0; _index < elementList.getLength();_index++) {
00062 commentNode = ( Node ) elementList.item(_index);
00063 commentName = commentNode.getNodeName();
00064
00065 if(
00066 equals("#comment",commentName)
00067 ) {
00068 commentValue = commentNode.getNodeValue();
00069 assertEquals("value"," This is comment number 1.",commentValue);
00070
00071 }
00072
00073 }
00074
00075 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001