01: package org.geotools.data.store;
02:
03: import org.geotools.feature.FeatureType;
04: import org.geotools.feature.FeatureTypes;
05:
06: public class ReTypingFeatureCollectionTest extends
07: FeatureCollectionWrapperTestSupport {
08:
09: public void testSchema() throws Exception {
10: // see http://jira.codehaus.org/browse/GEOT-1616
11: FeatureType original = delegate.getSchema();
12: String newName = original.getTypeName() + "xxx";
13: FeatureType renamed = FeatureTypes.newFeatureType(original
14: .getAttributeTypes(), newName, original.getNamespace(),
15: original.isAbstract(), original.getAncestors(),
16: original.getDefaultGeometry());
17:
18: ReTypingFeatureCollection rtc = new ReTypingFeatureCollection(
19: delegate, renamed);
20: assertEquals(renamed, rtc.getSchema());
21: }
22: }
|