1   /*
2    * Copyright (c) 2003 Caltha Sp.J., All rights reserved
3    * 
4    * Created on Dec 2, 2003
5    */
6   package org.objectledge.xml;
7   
8   import java.net.URL;
9   
10  import junit.framework.TestCase;
11  
12  import org.objectledge.filesystem.ClasspathFileSystemProvider;
13  import org.objectledge.filesystem.FileSystem;
14  import org.objectledge.filesystem.FileSystemProvider;
15  
16  /***
17   *
18   *
19   * @author <a href="Rafal.Krzewski">rafal@caltha.pl</a>
20   * @version $Id: XMLValidatorTest.java,v 1.6 2004/06/01 11:13:57 zwierzem Exp $
21   */
22  public class XMLValidatorTest extends TestCase
23  {
24      /***
25       * Constructor for XMLValidatorTest.
26       * @param arg0
27       */
28      public XMLValidatorTest(String arg0)
29      {
30          super(arg0);
31      }
32  
33      public void testValidate()
34          throws Exception
35      {
36          ClasspathFileSystemProvider cps = new ClasspathFileSystemProvider("classpath", 
37              getClass().getClassLoader());
38          FileSystem fileSystem = new FileSystem(new FileSystemProvider[] { cps }, 4096, 4096);
39          XMLValidator xmlValidator = new XMLValidator(new XMLGrammarCache());
40          URL relaxng = fileSystem.getResource(XMLValidator.RELAXNG_SCHEMA);
41          xmlValidator.validate(relaxng, relaxng);
42      }
43  }