com.hp.hpl.mesa.rdf.jena.rdb
Class TestStoreRDB

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--com.hp.hpl.mesa.rdf.jena.rdb.TestStoreRDB
All Implemented Interfaces:
junit.framework.Test

public class TestStoreRDB
extends junit.framework.TestCase

Test harness for StoreRDB and supporting classes.

Version:
$Revision: 1.3 $ on $Date: 2002/03/01 14:25:13 $
Author:
Dave Reynolds

Constructor Summary
TestStoreRDB(java.lang.String name, java.lang.String layout, java.lang.String database)
          Construct a test suitable for the given layout and database combo
 
Method Summary
 void clearModel()
          remove all current statements
 void createModel(boolean hint)
          Create a model to be tested
 void doTestConstraints()
          Check list statements with constraints
 void doTestDeleteStatement()
          Check delete statement - this version is dependent on result order, may need changing
 void doTestLangAttrib()
          Check xml:lang on literals - multibyte support depends on the database
 void doTestListNamespaces()
          Check listNamepsaces
 void doTestListStatements()
          Check list statements - this version is dependent on result order, may need changing
 void doTestListSubjects()
          Check listSubjects
 void doTestMultipleAssert()
          Check case of asserting the same statement twice
 void doTestMultipleResources()
          Check asserting resources with different namespaces but same local name
 void doTestSQLCachePS()
          Check SQLCache preparedStatement functions
 void listTable(java.lang.String tname)
          Helper function during debug - list a table
 void setUp()
          Support code - open a connection to a newly formatted database.
static junit.framework.TestSuite suite(java.lang.String layout, java.lang.String database)
           
 void tearDown()
          Support code - tear down the connection
 void testStore()
          The main test function.
 void testStoreHint()
          Try again with storage hints on p1
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, name, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestStoreRDB

public TestStoreRDB(java.lang.String name,
                    java.lang.String layout,
                    java.lang.String database)
Construct a test suitable for the given layout and database combo
Method Detail

setUp

public void setUp()
           throws RDFRDBException
Support code - open a connection to a newly formatted database.

tearDown

public void tearDown()
              throws java.sql.SQLException,
                     RDFRDBException
Support code - tear down the connection

createModel

public void createModel(boolean hint)
                 throws RDFException
Create a model to be tested

clearModel

public void clearModel()
                throws RDFException
remove all current statements

testStore

public void testStore()
               throws java.sql.SQLException,
                      RDFException
The main test function. Do as one big function instead of lots of little ones to avoid creating and tearing down the database too many times.

testStoreHint

public void testStoreHint()
                   throws java.sql.SQLException,
                          RDFException
Try again with storage hints on p1

doTestListSubjects

public void doTestListSubjects()
                        throws java.sql.SQLException,
                               RDFException
Check listSubjects

doTestListNamespaces

public void doTestListNamespaces()
                          throws RDFException,
                                 java.sql.SQLException
Check listNamepsaces

doTestListStatements

public void doTestListStatements()
                          throws RDFException,
                                 java.sql.SQLException
Check list statements - this version is dependent on result order, may need changing

doTestConstraints

public void doTestConstraints()
                       throws RDFException,
                              java.sql.SQLException
Check list statements with constraints

doTestDeleteStatement

public void doTestDeleteStatement()
                           throws RDFException
Check delete statement - this version is dependent on result order, may need changing

doTestSQLCachePS

public void doTestSQLCachePS()
                      throws java.sql.SQLException,
                             RDFRDBException
Check SQLCache preparedStatement functions

doTestMultipleAssert

public void doTestMultipleAssert()
                          throws RDFException,
                                 java.sql.SQLException
Check case of asserting the same statement twice

doTestMultipleResources

public void doTestMultipleResources()
                             throws RDFException
Check asserting resources with different namespaces but same local name

doTestLangAttrib

public void doTestLangAttrib()
                      throws RDFException
Check xml:lang on literals - multibyte support depends on the database

listTable

public void listTable(java.lang.String tname)
               throws java.sql.SQLException,
                      RDFRDBException
Helper function during debug - list a table

suite

public static junit.framework.TestSuite suite(java.lang.String layout,
                                              java.lang.String database)


Copyright © 2001 Hewlett-Packard. All Rights Reserved.