01: /*
02: (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
03: [See end of file]
04: $Id: QueryTest.java,v 1.29 2008/01/02 12:08:56 andy_seaborne Exp $
05: */
06:
07: package com.hp.hpl.jena.graph.query.test;
08:
09: import com.hp.hpl.jena.graph.*;
10: import com.hp.hpl.jena.mem.*;
11:
12: import junit.framework.*;
13:
14: /**
15: Test query over plain memory graphs.
16: */
17:
18: public class QueryTest extends TestCase {
19: public QueryTest(String name) {
20: super (name);
21: }
22:
23: public static TestSuite suite() {
24: TestSuite result = new TestSuite();
25: result.addTest(new TestSuite(TestQueryGraphMem.class));
26: result.addTest(new TestSuite(TestQuerySmallGraphMem.class));
27: result.addTestSuite(TestQuery.class);
28: return result;
29: }
30:
31: public static class TestQueryGraphMem extends AbstractTestQuery {
32: public TestQueryGraphMem(String name) {
33: super (name);
34: }
35:
36: public Graph getGraph() {
37: return Factory.createGraphMem();
38: }
39: }
40:
41: public static class TestQuerySmallGraphMem extends
42: AbstractTestQuery {
43: public TestQuerySmallGraphMem(String name) {
44: super (name);
45: }
46:
47: public Graph getGraph() {
48: return new SmallGraphMem();
49: }
50: }
51:
52: }
53:
54: /*
55: (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
56: All rights reserved.
57:
58: Redistribution and use in source and binary forms, with or without
59: modification, are permitted provided that the following conditions
60: are met:
61:
62: 1. Redistributions of source code must retain the above copyright
63: notice, this list of conditions and the following disclaimer.
64:
65: 2. Redistributions in binary form must reproduce the above copyright
66: notice, this list of conditions and the following disclaimer in the
67: documentation and/or other materials provided with the distribution.
68:
69: 3. The name of the author may not be used to endorse or promote products
70: derived from this software without specific prior written permission.
71:
72: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
73: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
74: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
75: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
76: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
77: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
78: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
79: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
80: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
81: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
82: */
|