1 package org.cateproject.marshal;
2
3 import java.io.IOException;
4 import java.io.Reader;
5 import java.io.StringReader;
6
7 import javax.xml.bind.JAXBException;
8
9 import org.cateproject.model.DataSet;
10 import org.junit.Test;
11 import org.xml.sax.SAXException;
12
13 public class SimpleMarshalTest {
14 private String documentText = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
15 "<DataSet xmlns=\"http://cate-project.org/schema/0.6\">\n" +
16 "<Occurences/>\n" +
17 "<Agents/>\n" +
18 "<TaxonomicNames/>\n" +
19 "<Taxa/>" +
20 "<Media/>" +
21 "</DataSet>";
22
23
24
25
26
27
28
29 @Test
30 public void testEmptyDocument() throws JAXBException, SAXException, IOException
31 {
32 CATEDocumentBuilder cateDocumentBuilder = new CATEDocumentBuilder();
33
34 Reader reader = new StringReader(documentText);
35 DataSet dataSet = cateDocumentBuilder.getDataSet(reader);
36 }
37
38
39
40
41 @Test
42 public void testCreation() throws JAXBException, SAXException
43 {
44 CATEDocumentBuilder cateDocumentBuilder = new CATEDocumentBuilder();
45 }
46 }