01: package org.geotools.data.gml;
02:
03: import java.util.ArrayList;
04: import java.util.List;
05:
06: import org.geotools.feature.Feature;
07: import org.geotools.feature.FeatureType;
08:
09: public class GMLIteratorTest extends GMLDataStoreTestSupport {
10:
11: public void test() throws Exception {
12: GMLIterator iterator = new GMLIterator((GMLTypeEntry) dataStore
13: .entry("TestFeature"));
14:
15: List features = new ArrayList();
16: while (iterator.hasNext()) {
17: features.add(iterator.next());
18: }
19:
20: assertEquals(3, features.size());
21: for (int i = 0; i < features.size(); i++) {
22: Feature feature = (Feature) features.get(i);
23: assertNotNull(feature);
24: assertEquals("" + i, feature.getID());
25: }
26: }
27: }
|