[Nodal-cvs] j-test/src/test/org/nodal/schemata/text/xml TestXML.java,NONE,1.1
Status: Pre-Alpha
Brought to you by:
leei
From: Lee I. <le...@us...> - 2004-10-03 19:43:49
|
Update of /cvsroot/nodal/j-test/src/test/org/nodal/schemata/text/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12471/src/test/org/nodal/schemata/text/xml Added Files: TestXML.java Log Message: First commit separating j-test from j-src --- NEW FILE: TestXML.java --- /* * Distributed under the Apache Software License, Version 1.1 * (see below, or the file LICENSE for terms and conditions) * * Copyright (c) 2003 University of British Columbia. All rights reserved. * * Created on Feb 20, 2004 */ package test.org.nodal.schemata.text.xml; import java.net.MalformedURLException; import java.net.URL; import org.nodal.Nodal; import org.nodal.Types; import org.nodal.filesystem.DocumentFormat; import org.nodal.model.NodeFactory; import storage.trans.TransientRepository; import test.org.nodal.schemata.SchemataTestCase; /** * * Created on Feb 20, 2004 * * @author leei */ public class TestXML extends SchemataTestCase { private TransientRepository repo; /** * Constructor for TestXML. * * @param arg0 */ public TestXML(String arg0) { super(arg0); } /* * @see TestCase#setUp() */ protected void setUp() throws Exception { repo = (TransientRepository) Nodal.openRepository("memory://transient"); NodeFactory factory = repo.createNode(Types.DOCTYPE); DocumentFormat format = DocumentFormat.Registry.get("text/xml"); super.setUp(format, factory); } /* * @see TestCase#tearDown() */ protected void tearDown() throws Exception { super.tearDown(); } public void testParser() { try { URL baseTypes = new URL(Types.BASEURI); tryParser (baseTypes); tryParser (new URL (baseTypes, "xml.nls")); tryParser (new URL (baseTypes, "text.nls")); tryParser (new URL (baseTypes, "octet.nls")); //tryParser (new URL (baseTypes, "types.dtd"), xmlFormat); } catch (MalformedURLException e) { e.printStackTrace(System.err); fail(); } } } |