Permalink
Browse files

fix up geojson test cases

  • Loading branch information...
1 parent 0be5e64 commit 0ba97d2fc3ec3d8502f41cf95fb92b15365845a4 @jodygarnett jodygarnett committed Oct 30, 2012
@@ -79,7 +79,7 @@ static void bencharkGeometryEncode(FeatureSource data) throws Exception {
long t2 = System.currentTimeMillis();
System.out.println(t2-t1);
- features.close(it);
+ it.close();
}
static FeatureSource loadData() throws Exception {
@@ -473,16 +473,15 @@ public void testFeatureCollectionRead() throws Exception {
FeatureCollection expected = collection();
assertEquals(expected.size(), actual.size());
- Iterator a = actual.iterator();
- Iterator e = expected.iterator();
+ FeatureIterator a = actual.features();
+ FeatureIterator e = expected.features();
while(e.hasNext()) {
assertTrue(a.hasNext());
assertEqualsLax((SimpleFeature)e.next(), (SimpleFeature) a.next());
}
-
- actual.close(a);
- expected.close(e);
+ a.close();
+ e.close();
}
public void testFeatureCollectionStreamBasic() throws Exception {
@@ -498,7 +497,7 @@ void testFeatureCollectionStream(boolean withBounds, boolean withCRS) throws Exc
fjson.streamFeatureCollection(reader(strip(collectionText(withBounds, withCRS))));
FeatureCollection expected = collection();
- Iterator e = expected.iterator();
+ FeatureIterator e = expected.features();
while(e.hasNext()) {
features.hasNext(); //ensure that hasNext() does not skip features
@@ -507,7 +506,7 @@ void testFeatureCollectionStream(boolean withBounds, boolean withCRS) throws Exc
}
features.close();
- expected.close(e);
+ e.close();
}
public void testFeatureCollectionWithBoundsWrite() throws Exception {

0 comments on commit 0ba97d2

Please sign in to comment.