1 package eu
.etaxonomy
.cdm
.io
.jaxb
;
3 import java
.io
.IOException
;
5 import javax
.xml
.bind
.JAXBException
;
7 import junit
.framework
.Assert
;
9 import org
.junit
.Before
;
10 import org
.junit
.Ignore
;
11 import org
.junit
.Test
;
12 import org
.xml
.sax
.SAXException
;
14 import eu
.etaxonomy
.cdm
.io
.jaxb
.CdmSchemaGenerator
;
16 public class CdmSchemaGeneratorTest
{
18 private CdmSchemaGenerator cdmSchemaGenerator
;
21 public void onSetUp() throws Exception
{
22 cdmSchemaGenerator
= new CdmSchemaGenerator();
25 /* ******************** TESTS ***********************************************************/
29 public void testCdmSchemaGeneratorInit() {
30 Assert
.assertNotNull(cdmSchemaGenerator
);
35 // buffers the schema files
36 public void testCreateOutput() throws JAXBException
, IOException
, SAXException
{
38 cdmSchemaGenerator
.createOutput("http://etaxonomy.eu/cdm/model/1.0", "mySchema.xsd");
42 // Gives an IllegalArgumentException: argument contains null.
43 // Problem is in schema7.xsd.
45 // writes the schema files
46 public void testWriteSchema() throws JAXBException
, IOException
, SAXException
{
48 cdmSchemaGenerator
.writeSchema();