01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data.postgis;
17:
18: import java.io.IOException;
19:
20: import org.geotools.data.DataStore;
21: import org.geotools.feature.IllegalAttributeException;
22:
23: public class TransparentVersionedOnlineTest extends
24: PostgisDataStoreAPIOnlineTest {
25:
26: public TransparentVersionedOnlineTest(String test) {
27: super (test);
28: }
29:
30: protected void setupDbTables() throws Exception {
31: super .setupDbTables();
32: // make sure versioned metadata is not in the way
33: SqlTestUtils.dropTable(pool,
34: VersionedPostgisDataStore.TBL_TABLESCHANGED, false);
35: SqlTestUtils.dropTable(pool,
36: VersionedPostgisDataStore.TBL_VERSIONEDTABLES, false);
37: SqlTestUtils.dropTable(pool,
38: VersionedPostgisDataStore.TBL_CHANGESETS, true);
39: }
40:
41: public String getFixtureFile() {
42: return "versioned.properties";
43: }
44:
45: protected DataStore newDataStore() throws IOException {
46: VersionedPostgisDataStore ds = new VersionedPostgisDataStore(
47: pool, f.schema, getName(),
48: PostgisDataStore.OPTIMIZE_SQL);
49: ds.setWKBEnabled(true);
50: ds.setVersioned("road", true, "gimbo", "hallabaloola");
51: ds.setVersioned("river", true, "gimbo", "hallabaloola");
52: return ds;
53: }
54:
55: /**
56: * Return true if the datastore is capable of computing the road bounds
57: * given a query
58: *
59: * @return
60: */
61: protected boolean isEnvelopeComputingEnabled() {
62: return true;
63: }
64:
65: public void testOidFidMapper() throws IOException,
66: IllegalAttributeException {
67: // we have to override this one since versioned does not support oid
68: // mapper
69: }
70:
71: public void testLockFeatures() throws IOException {
72: // disable this test, we don't support locking at the moment
73: }
74:
75: public void testUnLockFeatures() throws IOException {
76: // disable this test, we don't support locking at the moment
77: }
78:
79: public void testLockFeatureInteraction() throws IOException {
80: // disable this test, we don't support locking at the moment
81: }
82:
83: public void testGetFeatureLockingExpire() throws Exception {
84: // disable this test, we don't support locking at the moment
85: }
86: }
|