3 import static org.junit.Assert.assertTrue;
5 import java.io.FileInputStream;
6 import java.io.InputStream;
8 import javax.xml.XMLConstants;
9 import javax.xml.transform.stream.StreamSource;
10 import javax.xml.validation.Schema;
11 import javax.xml.validation.SchemaFactory;
13 import org.junit.Test;
19 public class ModelXMLTest {
22 public void test() throws Exception {
23 InputStream in =
new FileInputStream(
"model.xsd");
24 assertTrue(in != null);
25 SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
26 Schema s = sf.newSchema(
new StreamSource(in));