KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > rdf > model > test > TestReifiedStatements


1 package com.hp.hpl.jena.rdf.model.test;
2
3 /*
4   (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
5   [See end of file]
6   $Id: TestReifiedStatements.java,v 1.14 2005/02/21 12:15:17 andy_seaborne Exp $
7 */

8
9 import com.hp.hpl.jena.rdf.model.*;
10 import com.hp.hpl.jena.shared.ReificationStyle;
11
12 import junit.framework.*;
13
14 /**
15     test the properties required of ReifiedStatement objects.
16     @author kers
17 */

18 public class TestReifiedStatements extends ModelTestBase
19     {
20     public TestReifiedStatements( String JavaDoc name )
21         { super( name ); }
22     
23     public static TestSuite suite()
24         { TestSuite result = new TestSuite();
25         result.addTest( new TestSuite( TestStandard.class ) );
26         result.addTest( new TestSuite( TestConvenient.class ) );
27         result.addTest( new TestSuite( TestMinimal.class ) );
28         return result; }
29         
30     public Model getModel()
31         { return ModelFactory.createDefaultModel(); }
32         
33     public static class TestStandard extends AbstractTestReifiedStatements
34         {
35         public TestStandard( String JavaDoc name ) { super( name ); }
36         public static final ReificationStyle style = ModelFactory.Standard;
37         public Model getModel() { return ModelFactory.createDefaultModel( style ); }
38         public void testStyle() { assertEquals( style, getModel().getReificationStyle() ); }
39         }
40         
41     public static class TestConvenient extends AbstractTestReifiedStatements
42         {
43         public TestConvenient( String JavaDoc name ) { super( name ); }
44         public static final ReificationStyle style = ModelFactory.Convenient;
45         public Model getModel() { return ModelFactory.createDefaultModel( style ); }
46         public void testStyle() { assertEquals( style, getModel().getReificationStyle() ); }
47         }
48         
49     public static class TestMinimal extends AbstractTestReifiedStatements
50         {
51         public TestMinimal( String JavaDoc name ) { super( name ); }
52         public static final ReificationStyle style = ModelFactory.Minimal;
53         public Model getModel() { return ModelFactory.createDefaultModel( style); }
54         public void testStyle() { assertEquals( style, getModel().getReificationStyle() ); }
55         }
56     }
57     
58 /*
59     (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
60     All rights reserved.
61
62     Redistribution and use in source and binary forms, with or without
63     modification, are permitted provided that the following conditions
64     are met:
65
66     1. Redistributions of source code must retain the above copyright
67        notice, this list of conditions and the following disclaimer.
68
69     2. Redistributions in binary form must reproduce the above copyright
70        notice, this list of conditions and the following disclaimer in the
71        documentation and/or other materials provided with the distribution.
72
73     3. The name of the author may not be used to endorse or promote products
74        derived from this software without specific prior written permission.
75
76     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
77     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
78     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
79     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
80     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
81     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
82     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
83     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
84     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
85     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
86 */
Popular Tags