01: package org.geotools.data.gml;
02:
03: import org.geotools.data.FeatureSource;
04: import org.geotools.data.Query;
05: import org.geotools.feature.FeatureCollection;
06: import org.geotools.feature.FeatureType;
07:
08: public class GMLDataStoreTest extends GMLDataStoreTestSupport {
09:
10: public void testGetSchema() throws Exception {
11: FeatureType featureType = dataStore.getSchema("TestFeature");
12: assertNotNull(featureType);
13:
14: assertEquals("http://www.geotools.org/test", featureType
15: .getNamespace().toString());
16: assertTrue(featureType.getAttributeType("geom") != null);
17: assertTrue(featureType.getAttributeType("count") != null);
18: }
19:
20: public void testGetTypeNames() throws Exception {
21: String[] typeNames = dataStore.getTypeNames();
22: assertEquals(1, typeNames.length);
23: assertEquals("TestFeature", typeNames[0]);
24: }
25:
26: public void testGetFeatureSource() throws Exception {
27: FeatureSource featureSource = dataStore
28: .getFeatureSource("TestFeature");
29: assertNotNull(featureSource);
30: }
31:
32: public void testGetFeatures() throws Exception {
33: FeatureSource featureSource = dataStore
34: .getFeatureSource("TestFeature");
35: FeatureCollection features = featureSource.getFeatures();
36: assertEquals(3, features.size());
37:
38: }
39:
40: }
|