gate.db
Class TestDB

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--gate.db.TestDB
All Implemented Interfaces:
junit.framework.Test

public class TestDB
extends junit.framework.TestCase


Constructor Summary
TestDB(String name)
          Construction
 
Method Summary
 void doTestCorpus(Database db)
          Creates a new transient corpus; Creates a new transient document and adds it to the newcorpus; Creates a persistent corpus starting from the transient one; Closes the database connection; Re-opens the database connection; Retrieves the previuosly created corpus and checks its contents.
 void doTestDatabase(Database db)
          Checks whether the provided database complies with Gate2 requirements
static void main(String[] args)
           
 void setUp()
          Connect to the DataStoreImpl
static junit.framework.Test suite()
          Test suite routine for the test runner
 void tearDown()
          Close the db connections
 void testCorpus()
           
 void testDatabase()
           
 void testObjectWriter()
          tests the functionality of gate.util.ObjectWriter
 
Methods inherited from class junit.framework.TestCase
countTestCases, name, run, run, runBare, 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, fail, fail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestDB

public TestDB(String name)
Construction
Method Detail

setUp

public void setUp()
           throws SQLException
Connect to the DataStoreImpl

tearDown

public void tearDown()
              throws OpenTransactionsException
Close the db connections

doTestDatabase

public void doTestDatabase(Database db)
Checks whether the provided database complies with Gate2 requirements

doTestCorpus

public void doTestCorpus(Database db)
                  throws IOException,
                         SQLException,
                         GateException,
                         OpenTransactionsException
Creates a new transient corpus; Creates a new transient document and adds it to the newcorpus; Creates a persistent corpus starting from the transient one; Closes the database connection; Re-opens the database connection; Retrieves the previuosly created corpus and checks its contents.

testObjectWriter

public void testObjectWriter()
                      throws IOException,
                             ClassNotFoundException
tests the functionality of gate.util.ObjectWriter

testDatabase

public void testDatabase()

testCorpus

public void testCorpus()
                throws IOException,
                       SQLException,
                       GateException,
                       OpenTransactionsException

suite

public static junit.framework.Test suite()
Test suite routine for the test runner

main

public static void main(String[] args)