01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.http.webclient;
07:
08: import java.io.File;
09:
10: import javax.xml.XMLConstants;
11: import javax.xml.validation.SchemaFactory;
12:
13: import junit.framework.TestCase;
14:
15: import info.aduna.xml.DocumentUtil;
16:
17: /**
18: * @author Herko ter Horst
19: */
20: public class WebXmlValidationTest extends TestCase {
21:
22: public void testValidXml() {
23: try {
24: File webXml = new File("src/main/webapp/WEB-INF/web.xml");
25:
26: DocumentUtil.getDocument(webXml.toURL(), SchemaFactory
27: .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)
28: .newSchema());
29: } catch (Exception e) {
30: e.printStackTrace();
31: fail(e.getMessage());
32: }
33: }
34: }
|