1 package org.codehaus.dataforge.engine.configuration;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import junit.framework.TestCase;
20
21 import org.codehaus.dataforge.engine.DataForge;
22
23 /***
24 * @author <a href="mailto:ben@walding.com">Ben Walding</a>
25 * @version $Id: ValidationTest.java,v 1.4 2004/02/22 01:10:52 bwalding Exp $
26 */
27 public class ValidationTest extends TestCase {
28 /*** log4j logger */
29 private static final org.apache.log4j.Logger LOGGER = org.apache.log4j.Logger.getLogger(ValidationTest.class);
30
31
32 public void testSimple() {
33 try {
34 LOGGER.info("It is expected that digester will display a single parse exception. We are testing to make sure the exception is thrown by the error handler.");
35 DataForge df = XMLConfiguration.quickConfig(getClass(), "ValidationTest1.df.invalid");
36 fail("The configuration file does not follow the DTD. Loading it should have thrown an Exception");
37 df.getClass();
38 } catch (Exception ex) {
39
40 }
41 }
42 }