01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18: package org.example.junit;
19:
20: import junit.framework.TestCase;
21: import org.xml.sax.SAXException;
22: import org.xml.sax.XMLReader;
23: import org.xml.sax.helpers.XMLReaderFactory;
24:
25: /**
26: * created Aug 12, 2004 1:39:59 PM
27: */
28:
29: public class XmlParserTest extends TestCase {
30:
31: public XmlParserTest(String s) {
32: super (s);
33: }
34:
35: public void testXercesIsPresent() throws SAXException {
36: XMLReader xerces;
37: xerces = XMLReaderFactory
38: .createXMLReader("org.apache.xerces.parsers.SAXParser");
39: assertNotNull(xerces);
40: }
41:
42: public void testXercesHandlesSchema() throws SAXException {
43: XMLReader xerces;
44: xerces = XMLReaderFactory
45: .createXMLReader("org.apache.xerces.parsers.SAXParser");
46: xerces.setFeature(
47: "http://apache.org/xml/features/validation/schema",
48: true);
49: }
50:
51: public void testParserHandlesSchema() throws SAXException {
52: XMLReader xerces;
53: xerces = XMLReaderFactory.createXMLReader();
54: xerces.setFeature(
55: "http://apache.org/xml/features/validation/schema",
56: true);
57: }
58:
59: }
|