| org.geotools.test.OnlineTestCase
All known Subclasses: org.geotools.data.oracle.OracleDataStoreFactoryOnlineTest, org.geotools.data.postgis.PostgisOnlineTestCase,
OnlineTestCase | abstract public class OnlineTestCase extends TestCase (Code) | | Test support for test cases which require an "online" resource, such as an
external server or database.
Online tests work off of a "fixture". A fixture is a properties file which
defines connection parameters for some remote service. Each online test case
must define the id of the fixture is uses with
OnlineTestCase.getFixtureId() .
Fixtures are stored under the users home directory, under the "
.geotools "
directory. In the event that a fixture does not exist, the test case is
aborted.
Online tests connect to remote / online resources. Test cases should do all
connection / disconnection in the
OnlineTestCase.connect and
OnlineTestCase.disconnect() methods.
since: 2.4 version: $Id: OnlineTestCase.java 25806 2007-06-11 22:04:55Z chorner $ author: Justin Deoliveira, The Open Planning Project |
Field Summary | |
protected Properties | fixture The test fixture,
null if the fixture is not available. | static boolean | once |
fixture | protected Properties fixture(Code) | | The test fixture,
null if the fixture is not available.
|
connect | protected void connect() throws Exception(Code) | | Connection method, called from
OnlineTestCase.setUp() .
Subclasses should do all initialization / connection here. In the event
of a connection not being available, this method should throw an
exception to abort the test case.
throws: Exception - if the connection failed. |
getFixtureId | abstract protected String getFixtureId()(Code) | | The fixture id for the test case.
This name is hierachical, similar to a java package name. Example:
"postgis.demo_bc" .
The fixture id. |
runTest | protected void runTest() throws Throwable(Code) | | Override which checks if the fixture is available. If not the test is not
executed.
|
|
|