// Path: src/test/java/xdb/test/TestUtil.java
// public class TestUtil {
// 
//     public static Document parse(String xml) throws Exception {
//         StringReader reader = new StringReader(xml);
//         InputSource is = new InputSource(reader);
//         return new XmlParser().parse(is);
//     }
// }


import junit.framework.TestCase;
import org.w3c.dom.Element;
import xdb.test.TestUtil;
package xdb.renderer;




public class RendererInitTest extends TestCase {

    public RendererInitTest(String testName) {
        super(testName);
    }

    public void testInit() throws Exception {
        Element configElement = getConfigElement();
        String fileName = "test-config.xml";
        try {
            RendererInit.init(configElement, fileName);
            fail("Exception expected for bogus renderer type");
        } catch (Exception ex) {
            // Expected
        }
    }

    private Element getConfigElement() throws Exception {
        String xml = "<bogus-renderer-type />";
// Path: src/test/java/xdb/test/TestUtil.java
// public class TestUtil {
// 
//     public static Document parse(String xml) throws Exception {
//         StringReader reader = new StringReader(xml);
//         InputSource is = new InputSource(reader);
//         return new XmlParser().parse(is);
//     }
// }


// Path: src/test/java/xdb/renderer/RendererInitTest.java
import junit.framework.TestCase;
import org.w3c.dom.Element;
import xdb.test.TestUtil;

package xdb.renderer;




public class RendererInitTest extends TestCase {

    public RendererInitTest(String testName) {
        super(testName);
    }

    public void testInit() throws Exception {
        Element configElement = getConfigElement();
        String fileName = "test-config.xml";
        try {
            RendererInit.init(configElement, fileName);
            fail("Exception expected for bogus renderer type");
        } catch (Exception ex) {
            // Expected
        }
    }

    private Element getConfigElement() throws Exception {
        String xml = "<bogus-renderer-type />";
        return TestUtil.parse(xml).getDocumentElement();