KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > rdf > arp > test > TestScope


1 /*
2    (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
3   [See end of file]
4   $Id: TestScope.java,v 1.7 2005/02/21 12:11:14 andy_seaborne Exp $
5 */

6 package com.hp.hpl.jena.rdf.arp.test;
7 import junit.framework.*;
8 //import com.hp.hpl.jena.rdf.arp.*;
9
import java.io.*;
10
11 import com.hp.hpl.jena.rdf.model.*;
12
13 /**
14  * @author <a HREF="mailto:Jeremy.Carroll@hp.com">Jeremy Carroll</a>
15  *
16 */

17 public class TestScope extends TestCase {
18     public static Test suite() {
19         TestSuite s = new TestSuite(TestScope.class);
20         s.setName("ARP Scoping");
21         return s;
22     }
23   public TestScope(String JavaDoc nm){
24         super(nm);
25     }
26     
27     public void test01() throws Exception JavaDoc {
28
29         check("testing/wg/rdfms-syntax-incomplete/test004.rdf");
30     // check("testing/arp/scope/test01.rdf");
31
}
32     public void test02() throws Exception JavaDoc {
33         check("testing/arp/scope/test02.rdf");
34     }
35     public void test03() throws Exception JavaDoc {
36         check("testing/arp/scope/test03.rdf");
37     }
38     
39
40     public void test04() throws Exception JavaDoc {
41         check("testing/arp/scope/test04.rdf");
42     }
43     
44     public void test05() throws Exception JavaDoc {
45         check("testing/arp/scope/test05.rdf");
46     }
47     static RDFErrorHandler suppress = new RDFErrorHandler(){
48
49         public void warning(Exception JavaDoc e) {
50         }
51
52         public void error(Exception JavaDoc e) {
53         }
54
55         public void fatalError(Exception JavaDoc e) {
56         }
57         
58     };
59     private void check(final String JavaDoc fn) throws IOException {
60         
61         NTripleTestSuite.loadRDFx(new InFactoryX(){
62
63             public InputStream open() throws IOException {
64                 return new FileInputStream(fn);
65             }
66         },suppress,"http://example.org/a",false,0);
67     // in.close();
68
}
69
70 }
71
72 /*
73    (c) Copyright 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
74     All rights reserved.
75
76     Redistribution and use in source and binary forms, with or without
77     modification, are permitted provided that the following conditions
78     are met:
79
80     1. Redistributions of source code must retain the above copyright
81        notice, this list of conditions and the following disclaimer.
82
83     2. Redistributions in binary form must reproduce the above copyright
84        notice, this list of conditions and the following disclaimer in the
85        documentation and/or other materials provided with the distribution.
86
87     3. The name of the author may not be used to endorse or promote products
88        derived from this software without specific prior written permission.
89
90     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
91     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
92     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
93     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
94     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
95     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
96     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
97     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
98     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
99     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
100 */
Popular Tags