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.10 $ on $Date: 2002/10/04 14:04:14 $
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 doTestBulkLoader()
          Test the bulk loader
 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 doTestModelCleaning()
          Test model cleaning operations
 void doTestMultipleAssert()
          Check case of asserting the same statement twice
 void doTestMultipleResources()
          Check asserting resources with different namespaces but same local name
 void doTestReification()
          check use of reification
 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.

Overrides:
setUp in class junit.framework.TestCase
RDFRDBException

tearDown

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

Overrides:
tearDown in class junit.framework.TestCase
java.sql.SQLException
RDFRDBException

createModel

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

RDFException

clearModel

public void clearModel()
                throws RDFException
remove all current statements

RDFException

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.

java.sql.SQLException
RDFException

testStoreHint

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

java.sql.SQLException
RDFException

doTestListSubjects

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

java.sql.SQLException
RDFException

doTestListNamespaces

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

RDFException
java.sql.SQLException

doTestListStatements

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

RDFException
java.sql.SQLException

doTestConstraints

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

RDFException
java.sql.SQLException

doTestDeleteStatement

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

RDFException

doTestSQLCachePS

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

java.sql.SQLException
RDFRDBException

doTestMultipleAssert

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

RDFException
java.sql.SQLException

doTestMultipleResources

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

RDFException

doTestLangAttrib

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

RDFException

doTestReification

public void doTestReification()
                       throws RDFException
check use of reification

RDFException

doTestModelCleaning

public void doTestModelCleaning()
                         throws RDFException
Test model cleaning operations

RDFException

doTestBulkLoader

public void doTestBulkLoader()
                      throws RDFException
Test the bulk loader

RDFException

listTable

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

java.sql.SQLException
RDFRDBException

suite

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


Copyright © 2001 Hewlett-Packard. All Rights Reserved.