org.geotools.data
Class AbstractDataStoreTest

Object
  extended by Assert
      extended by TestCase
          extended by DataTestCase
              extended by AbstractDataStoreTest
All Implemented Interfaces:
Test

public abstract class AbstractDataStoreTest
extends DataTestCase

An abstract super class for testing datastore implementations. All datastore implementations should has a test case that extends this class.

Author:
Jesse Eichar, Refractions Research
Module:

Field Summary
 
Fields inherited from class DataTestCase
ff, gf, lakeBounds, lakeFeatures, lakeType, newRiver, newRoad, rd12Bounds, rd12Filter, rd1Filter, rd2Filter, riverBounds, riverFeatures, riverType, roadBounds, roadFeatures, roadType, rv1Filter, subRiverType, subRoadType
 
Constructor Summary
AbstractDataStoreTest(String arg0)
           
 
Method Summary
 void atestGetFeatureSourceRoad()
           
abstract  DataStore createDataStore()
          Creates a new instance of the datastore.
 boolean isFeatureEqual(SimpleFeature feature1, SimpleFeature feature2)
          This function is stolen from DefaultFeature equals method.
protected  void setUp()
          Invoked before a test is run.
protected  void tearDown()
          Set all data references to null, allowing garbage collection.
abstract  DataStore tearDownDataStore(DataStore data)
          This method must remove the roads and rivers types from the datastore.
 void testCreateSchema()
           
 void testFeatureEvents()
           
 void testFixture()
           
 void testGetFeatureLockingExpire()
           
 void testGetFeatureReader()
           
 void testGetFeatureReaderConcurancy()
           
 void testGetFeatureReaderFilterAutoCommit()
           
 void testGetFeatureReaderFilterTransaction()
           
 void testGetFeatureReaderMutability()
           
 void testGetFeatureSourceRiver()
           
 void testGetFeatureStoreAddFeatures()
           
 void testGetFeatureStoreModifyFeatures1()
           
 void testGetFeatureStoreModifyFeatures2()
           
 void testGetFeatureStoreRemoveFeatures()
           
 void testGetFeatureStoreSetFeatures()
           
 void testGetFeatureStoreTransactionSupport()
           
 void testGetFeaturesWriterAdd()
           
 void testGetFeaturesWriterModify()
           
 void testGetFeatureTypes()
           
 void testGetFeatureWriter()
           
 void testGetFeatureWriterAppendTypeNameTransaction()
           
 void testGetFeatureWriterFilter()
           
 void testGetFeatureWriterRemove()
           
 void testGetFeatureWriterTransaction()
          Test two transactions one removing feature, and one adding a feature.
 void testGetFeatureWriterTypeNameTransaction()
           
 void testGetSchema()
           
 void testLockFeatureInteraction()
           
 void testLockFeatures()
           
 void testUnLockFeatures()
           
 
Methods inherited from class DataTestCase
assertEquals, assertEquals, count, count, dataSetUp, line, lines, polygon, polygon, ring
 
Methods inherited from class TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractDataStoreTest

public AbstractDataStoreTest(String arg0)
Method Detail

createDataStore

public abstract DataStore createDataStore()
                                   throws Exception
Creates a new instance of the datastore. The datastore must not have a roads or rivers type.

Throws:
Exception

tearDownDataStore

public abstract DataStore tearDownDataStore(DataStore data)
                                     throws Exception
This method must remove the roads and rivers types from the datastore. It must also close all connections to the datastore if it has connections and get rid of any temporary files.

Parameters:
data - DOCUMENT ME!
Throws:
Exception

setUp

protected void setUp()
              throws Exception
Description copied from class: DataTestCase
Invoked before a test is run. The default implementation invokes DataTestCase.dataSetUp().

Overrides:
setUp in class DataTestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Description copied from class: DataTestCase
Set all data references to null, allowing garbage collection. This method is automatically invoked after each test.

Overrides:
tearDown in class DataTestCase
Throws:
Exception

testFeatureEvents

public void testFeatureEvents()
                       throws Exception
Throws:
Exception

testFixture

public void testFixture()
                 throws Exception
Throws:
Exception

testGetFeatureTypes

public void testGetFeatureTypes()

isFeatureEqual

public boolean isFeatureEqual(SimpleFeature feature1,
                              SimpleFeature feature2)
This function is stolen from DefaultFeature equals method. We want to check for equality except for featureId which we expect to be different.

Parameters:
feature1 - the Feature to test against.
feature2 - the Feature to test for equality.
Returns:
true if the object is equal, false otherwise.

testGetSchema

public void testGetSchema()
                   throws IOException
Throws:
IOException

testGetFeatureReader

public void testGetFeatureReader()
                          throws IOException,
                                 IllegalAttributeException
Throws:
IOException
IllegalAttributeException

testGetFeatureReaderMutability

public void testGetFeatureReaderMutability()
                                    throws IOException,
                                           IllegalAttributeException
Throws:
IOException
IllegalAttributeException

testGetFeatureReaderConcurancy

public void testGetFeatureReaderConcurancy()
                                    throws NoSuchElementException,
                                           IOException,
                                           IllegalAttributeException
Throws:
NoSuchElementException
IOException
IllegalAttributeException

testGetFeatureReaderFilterAutoCommit

public void testGetFeatureReaderFilterAutoCommit()
                                          throws NoSuchElementException,
                                                 IOException,
                                                 IllegalAttributeException
Throws:
NoSuchElementException
IOException
IllegalAttributeException

testGetFeatureReaderFilterTransaction

public void testGetFeatureReaderFilterTransaction()
                                           throws NoSuchElementException,
                                                  IOException,
                                                  IllegalAttributeException
Throws:
NoSuchElementException
IOException
IllegalAttributeException

testGetFeatureWriter

public void testGetFeatureWriter()
                          throws NoSuchElementException,
                                 IOException,
                                 IllegalAttributeException
Throws:
NoSuchElementException
IOException
IllegalAttributeException

testGetFeatureWriterRemove

public void testGetFeatureWriterRemove()
                                throws IOException,
                                       IllegalAttributeException
Throws:
IOException
IllegalAttributeException

testGetFeaturesWriterAdd

public void testGetFeaturesWriterAdd()
                              throws IOException,
                                     IllegalAttributeException
Throws:
IOException
IllegalAttributeException

testGetFeaturesWriterModify

public void testGetFeaturesWriterModify()
                                 throws IOException,
                                        IllegalAttributeException
Throws:
IOException
IllegalAttributeException

testGetFeatureWriterTypeNameTransaction

public void testGetFeatureWriterTypeNameTransaction()
                                             throws NoSuchElementException,
                                                    IOException,
                                                    IllegalAttributeException
Throws:
NoSuchElementException
IOException
IllegalAttributeException

testGetFeatureWriterAppendTypeNameTransaction

public void testGetFeatureWriterAppendTypeNameTransaction()
                                                   throws Exception
Throws:
Exception

testGetFeatureWriterFilter

public void testGetFeatureWriterFilter()
                                throws NoSuchElementException,
                                       IOException,
                                       IllegalAttributeException
Throws:
NoSuchElementException
IOException
IllegalAttributeException

testGetFeatureWriterTransaction

public void testGetFeatureWriterTransaction()
                                     throws Exception
Test two transactions one removing feature, and one adding a feature.

Throws:
Exception - DOCUMENT ME!

atestGetFeatureSourceRoad

public void atestGetFeatureSourceRoad()
                               throws IOException
Throws:
IOException

testGetFeatureSourceRiver

public void testGetFeatureSourceRiver()
                               throws NoSuchElementException,
                                      IOException,
                                      IllegalAttributeException
Throws:
NoSuchElementException
IOException
IllegalAttributeException

testGetFeatureStoreModifyFeatures1

public void testGetFeatureStoreModifyFeatures1()
                                        throws IOException
Throws:
IOException

testGetFeatureStoreModifyFeatures2

public void testGetFeatureStoreModifyFeatures2()
                                        throws IOException
Throws:
IOException

testGetFeatureStoreRemoveFeatures

public void testGetFeatureStoreRemoveFeatures()
                                       throws IOException
Throws:
IOException

testGetFeatureStoreAddFeatures

public void testGetFeatureStoreAddFeatures()
                                    throws IOException
Throws:
IOException

testGetFeatureStoreSetFeatures

public void testGetFeatureStoreSetFeatures()
                                    throws IOException
Throws:
IOException

testGetFeatureStoreTransactionSupport

public void testGetFeatureStoreTransactionSupport()
                                           throws Exception
Throws:
Exception

testLockFeatures

public void testLockFeatures()
                      throws IOException
Throws:
IOException

testUnLockFeatures

public void testUnLockFeatures()
                        throws IOException
Throws:
IOException

testLockFeatureInteraction

public void testLockFeatureInteraction()
                                throws IOException
Throws:
IOException

testGetFeatureLockingExpire

public void testGetFeatureLockingExpire()
                                 throws Exception
Throws:
Exception

testCreateSchema

public void testCreateSchema()
                      throws Exception
Throws:
Exception


Copyright © 1996-2009 Geotools. All Rights Reserved.