| org.geotools.data.ogr.TestCaseSupport
All known Subclasses: org.geotools.data.ogr.OGRDataStoreFactoryTest, org.geotools.data.ogr.OGRPeformanceTest, org.geotools.data.ogr.OGRDataStoreTest,
TestCaseSupport | public class TestCaseSupport extends TestCase (Code) | | Base class for test suite. This class is not abstract for the purpose of
TestCaseSupportTest , but should not be instantiated otherwise.
It should be extented (which is why the constructor is protected).
Note: a nearly identical copy of this file exists in the
ext/shape module.
version: $Id: TestCaseSupport.java 25075 2007-04-09 19:20:46Z desruisseaux $ author: Ian Schneider author: Martin Desruisseaux |
Constructor Summary | |
protected | TestCaseSupport(String name) Creates a new instance of
TestCaseSupport with the given name. |
Method Summary | |
protected void | copy(String name, String[] requiredExtensions, String[] optionalExtensions) Copies the specified shape file into the
test-data directory, together with its
sibling (
.dbf ,
.shp ,
.shx and
.prj files). | protected Feature | firstFeature(FeatureCollection fc) Returns the first feature in the given feature collection. | protected String | getAbsolutePath(String testData) | protected File | getTempFile() Creates a temporary file, to be automatically deleted at the end of the test suite. | protected Geometry | readGeometry(String wktResource) Read a geometry of the given name.
Parameters: wktResource - The resource name to load, without its .wkt extension. | public static Test | suite(Class c) Returns the test suite for the given class. | protected void | tearDown() Deletes all temporary files created by
TestCaseSupport.getTempFile . |
TestCaseSupport | protected TestCaseSupport(String name) throws IOException(Code) | | Creates a new instance of
TestCaseSupport with the given name.
|
copy | protected void copy(String name, String[] requiredExtensions, String[] optionalExtensions) throws IOException(Code) | | Copies the specified shape file into the
test-data directory, together with its
sibling (
.dbf ,
.shp ,
.shx and
.prj files).
|
getAbsolutePath | protected String getAbsolutePath(String testData) throws IOException(Code) | | Returns the absolute path of a test file, given its location in the test data set
Parameters: testData - throws: IOException - |
getTempFile | protected File getTempFile() throws IOException(Code) | | Creates a temporary file, to be automatically deleted at the end of the test suite.
|
readGeometry | protected Geometry readGeometry(String wktResource) throws IOException(Code) | | Read a geometry of the given name.
Parameters: wktResource - The resource name to load, without its .wkt extension. The geometry. throws: IOException - if reading failed. |
suite | public static Test suite(Class c)(Code) | | Returns the test suite for the given class.
|
|
|