hillion 02/05/02 05:14:54
Modified: test-sources/org/apache/batik/dom AppendChildTest.java
Log:
Fixed appendChild test.
Revision Changes Path
1.2 +14 -3 xml-batik/test-sources/org/apache/batik/dom/AppendChildTest.java
Index: AppendChildTest.java
===================================================================
RCS file:
/home/cvs/xml-batik/test-sources/org/apache/batik/dom/AppendChildTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AppendChildTest.java 12 Apr 2002 17:22:17 -0000 1.1
+++ AppendChildTest.java 2 May 2002 12:14:54 -0000 1.2
@@ -21,12 +21,15 @@
* This class tests the appendChild method.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephane Hillion</a>
- * @version $Id: AppendChildTest.java,v 1.1 2002/04/12 17:22:17 vhardy Exp $
+ * @version $Id: AppendChildTest.java,v 1.2 2002/05/02 12:14:54 hillion Exp $
*/
public class AppendChildTest extends AbstractTest {
public static String ERROR_GET_ELEMENT_BY_ID_FAILED
= "error.get.element.by.id.failed";
+ public static String ERROR_EXCEPTION_NOT_THROWN
+ = "error.exception.not.thrown";
+
public static String ENTRY_KEY_ID
= "entry.key.id";
@@ -75,7 +78,15 @@
url.openStream());
DocumentFragment docFrag = otherDocument.createDocumentFragment();
- docFrag.appendChild(doc.getDocumentElement());
- return reportSuccess();
+ try {
+ docFrag.appendChild(doc.getDocumentElement());
+ } catch (DOMException ex) {
+ return reportSuccess();
+ }
+
+ DefaultTestReport report = new DefaultTestReport(this);
+ report.setErrorCode(ERROR_EXCEPTION_NOT_THROWN);
+ report.setPassed(false);
+ return report;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]