org.geotools.data
Class AbstractDataStoreTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.geotools.data.DataTestCase
              extended byorg.geotools.data.AbstractDataStoreTest
All Implemented Interfaces:
junit.framework.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

Field Summary
 
Fields inherited from class org.geotools.data.DataTestCase
gf, lakeBounds, lakeFeatures, lakeType, newRiver, newRoad, rd12Bounds, rd12Filter, rd1Filter, rd2Filter, riverBounds, riverFeatures, riverType, roadBounds, roadFeatures, roadType, rv1Filter, subRiverType, subRoadType
 
Constructor Summary
AbstractDataStoreTest(java.lang.String arg0)
           
 
Method Summary
 void atestGetFeatureSourceRoad()
           
abstract  DataStore createDataStore()
          Creates a new instance of the datastore.
 boolean isFeatureEqual(Feature feature1, Feature 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 , 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 org.geotools.data.DataTestCase
assertEquals, assertEquals, count, count, dataSetUp, line, lines, polygon, polygon, ring
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractDataStoreTest

public AbstractDataStoreTest(java.lang.String arg0)
Method Detail

createDataStore

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

Returns:
Throws:
java.lang.Exception

tearDownDataStore

public abstract DataStore tearDownDataStore(DataStore data)
                                     throws java.lang.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!
Returns:
Throws:
java.lang.Exception

setUp

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

Overrides:
setUp in class DataTestCase
Throws:
java.lang.Exception

tearDown

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

Overrides:
tearDown in class DataTestCase
Throws:
java.lang.Exception

testFeatureEvents

public void testFeatureEvents()
                       throws java.lang.Exception
Throws:
java.lang.Exception

testFixture

public void testFixture()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testGetFeatureTypes

public void testGetFeatureTypes()

isFeatureEqual

public boolean isFeatureEqual(Feature feature1,
                              Feature 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 java.io.IOException
Throws:
java.io.IOException

testGetFeatureReader

public void testGetFeatureReader()
                          throws java.io.IOException,
                                 IllegalAttributeException
Throws:
java.io.IOException
IllegalAttributeException

testGetFeatureReaderMutability

public void testGetFeatureReaderMutability()
                                    throws java.io.IOException,
                                           IllegalAttributeException
Throws:
java.io.IOException
IllegalAttributeException

testGetFeatureReaderConcurancy

public void testGetFeatureReaderConcurancy()
                                    throws java.util.NoSuchElementException,
                                           java.io.IOException,
                                           IllegalAttributeException
Throws:
java.util.NoSuchElementException
java.io.IOException
IllegalAttributeException

testGetFeatureReaderFilterAutoCommit

public void testGetFeatureReaderFilterAutoCommit()
                                          throws java.util.NoSuchElementException,
                                                 java.io.IOException,
                                                 IllegalAttributeException
Throws:
java.util.NoSuchElementException
java.io.IOException
IllegalAttributeException

testGetFeatureReaderFilterTransaction

public void testGetFeatureReaderFilterTransaction()
                                           throws java.util.NoSuchElementException,
                                                  java.io.IOException,
                                                  IllegalAttributeException
Throws:
java.util.NoSuchElementException
java.io.IOException
IllegalAttributeException

testGetFeatureWriter

public void testGetFeatureWriter()
                          throws java.util.NoSuchElementException,
                                 java.io.IOException,
                                 IllegalAttributeException
Throws:
java.util.NoSuchElementException
java.io.IOException
IllegalAttributeException

testGetFeatureWriterRemove

public void testGetFeatureWriterRemove()
                                throws java.io.IOException,
                                       IllegalAttributeException
Throws:
java.io.IOException
IllegalAttributeException

testGetFeaturesWriterAdd

public void testGetFeaturesWriterAdd()
                              throws java.io.IOException,
                                     IllegalAttributeException
Throws:
java.io.IOException
IllegalAttributeException

testGetFeaturesWriterModify

public void testGetFeaturesWriterModify()
                                 throws java.io.IOException,
                                        IllegalAttributeException
Throws:
java.io.IOException
IllegalAttributeException

testGetFeatureWriterTypeNameTransaction

public void testGetFeatureWriterTypeNameTransaction()
                                             throws java.util.NoSuchElementException,
                                                    java.io.IOException,
                                                    IllegalAttributeException
Throws:
java.util.NoSuchElementException
java.io.IOException
IllegalAttributeException

testGetFeatureWriterAppendTypeNameTransaction

public void testGetFeatureWriterAppendTypeNameTransaction()
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

testGetFeatureWriterFilter

public void testGetFeatureWriterFilter()
                                throws java.util.NoSuchElementException,
                                       java.io.IOException,
                                       IllegalAttributeException
Throws:
java.util.NoSuchElementException
java.io.IOException
IllegalAttributeException

testGetFeatureWriterTransaction

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

Throws:
java.lang.Exception - DOCUMENT ME!

atestGetFeatureSourceRoad

public void atestGetFeatureSourceRoad()
                               throws java.io.IOException
Throws:
java.io.IOException

testGetFeatureSourceRiver

public void testGetFeatureSourceRiver()
                               throws java.util.NoSuchElementException,
                                      java.io.IOException,
                                      IllegalAttributeException
Throws:
java.util.NoSuchElementException
java.io.IOException
IllegalAttributeException

testGetFeatureStoreModifyFeatures1

public void testGetFeatureStoreModifyFeatures1()
                                        throws java.io.IOException
Throws:
java.io.IOException

testGetFeatureStoreModifyFeatures2

public void testGetFeatureStoreModifyFeatures2()
                                        throws java.io.IOException
Throws:
java.io.IOException

testGetFeatureStoreRemoveFeatures

public void testGetFeatureStoreRemoveFeatures()
                                       throws java.io.IOException
Throws:
java.io.IOException

testGetFeatureStoreAddFeatures

public void testGetFeatureStoreAddFeatures()
                                    throws java.io.IOException
Throws:
java.io.IOException

testGetFeatureStoreSetFeatures

public void testGetFeatureStoreSetFeatures()
                                    throws java.io.IOException
Throws:
java.io.IOException

testGetFeatureStoreTransactionSupport

public void testGetFeatureStoreTransactionSupport()
                                           throws java.lang.Exception
Throws:
java.lang.Exception

testLockFeatures

public void testLockFeatures()
                      throws java.io.IOException
Throws:
java.io.IOException

testUnLockFeatures

public void testUnLockFeatures()
                        throws java.io.IOException
Throws:
java.io.IOException

testLockFeatureInteraction

public void testLockFeatureInteraction()
                                throws java.io.IOException
Throws:
java.io.IOException

testGetFeatureLockingExpire

public void testGetFeatureLockingExpire()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testCreateSchema

public void testCreateSchema()
                      throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © GeoTools. All Rights Reserved.