JaRMoS  1.1
Java Reduced Model Simulations
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
ModelXMLTest.java
Go to the documentation of this file.
1 package jarmos.test;
2 
3 import static org.junit.Assert.assertTrue;
4 
5 import java.io.FileInputStream;
6 import java.io.InputStream;
7 
8 import javax.xml.XMLConstants;
9 import javax.xml.transform.stream.StreamSource;
10 import javax.xml.validation.Schema;
11 import javax.xml.validation.SchemaFactory;
12 
13 import org.junit.Test;
14 
19 public class ModelXMLTest {
20 
21  @Test
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));
27  s.newValidator();
28  }
29 
30 }