001: /*
002: (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
003: [See end of file]
004: $Id: TestScope.java,v 1.13 2008/01/02 12:06:50 andy_seaborne Exp $
005: */
006: package com.hp.hpl.jena.rdf.arp.test;
007:
008: import java.io.FileInputStream;
009: import java.io.IOException;
010: import java.io.InputStream;
011:
012: import junit.framework.Test;
013: import junit.framework.TestCase;
014: import junit.framework.TestSuite;
015:
016: import com.hp.hpl.jena.rdf.model.RDFErrorHandler;
017:
018: /**
019: * @author <a href="mailto:Jeremy.Carroll@hp.com">Jeremy Carroll</a>
020: *
021: */
022: public class TestScope extends TestCase {
023: public static Test suite() {
024: TestSuite s = new TestSuite(TestScope.class);
025: s.setName("ARP Scoping");
026: return s;
027: }
028:
029: public TestScope(String nm) {
030: super (nm);
031: }
032:
033: /*
034: public void test01() throws Exception {
035:
036: check("testing/wg/rdfms-syntax-incomplete/test004.rdf");
037: // check("testing/arp/scope/test01.rdf");
038: }
039: public void test02() throws Exception {
040: check("testing/arp/scope/test02.rdf");
041: }
042: public void test03() throws Exception {
043: check("testing/arp/scope/test03.rdf");
044: }
045:
046:
047: public void test04() throws Exception {
048: check("testing/arp/scope/test04.rdf");
049: }
050:
051: public void test05() throws Exception {
052: check("testing/arp/scope/test05.rdf");
053: }
054: */
055: public void test06() throws Exception {
056: check("testing/arp/scope/test06.rdf");
057: }
058:
059: static RDFErrorHandler suppress = new RDFErrorHandler() {
060:
061: public void warning(Exception e) {
062: }
063:
064: public void error(Exception e) {
065: }
066:
067: public void fatalError(Exception e) {
068: }
069:
070: };
071:
072: private void check(final String fn) throws IOException {
073:
074: NTripleTestSuite.loadRDFx(new InFactoryX() {
075:
076: public InputStream open() throws IOException {
077: return new FileInputStream(fn);
078: }
079: }, suppress, "http://example.org/a", false, 0);
080: // in.close();
081: }
082:
083: }
084:
085: /*
086: (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
087: All rights reserved.
088:
089: Redistribution and use in source and binary forms, with or without
090: modification, are permitted provided that the following conditions
091: are met:
092:
093: 1. Redistributions of source code must retain the above copyright
094: notice, this list of conditions and the following disclaimer.
095:
096: 2. Redistributions in binary form must reproduce the above copyright
097: notice, this list of conditions and the following disclaimer in the
098: documentation and/or other materials provided with the distribution.
099:
100: 3. The name of the author may not be used to endorse or promote products
101: derived from this software without specific prior written permission.
102:
103: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
104: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
105: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
106: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
107: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
108: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
109: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
110: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
111: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
112: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
113: */
|