Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GEOT-4457 - passing through accepts method

  • Loading branch information...
commit 697e6da9659fee7a9534fd41a8f7c7d573b4c246 1 parent 573031d
jdeolive authored
View
2  ...main/src/main/java/org/geotools/feature/collection/DecoratingSimpleFeatureCollection.java
@@ -57,7 +57,7 @@ protected DecoratingSimpleFeatureCollection(SimpleFeatureCollection delegate) {
public void accepts(org.opengis.feature.FeatureVisitor visitor,
org.opengis.util.ProgressListener progress) throws IOException {
- DataUtilities.visit(this, visitor, progress);
+ delegate.accepts(visitor, progress);
}
View
41 .../src/test/java/org/geotools/feature/collection/DecoratingSimpleFeatureCollectionTest.java
@@ -0,0 +1,41 @@
+/*
+ * GeoTools - The Open Source Java GIS Toolkit
+ * http://geotools.org
+ *
+ * (C) 2002-2013, Open Source Geospatial Foundation (OSGeo)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ */
+package org.geotools.feature.collection;
+
+import static org.easymock.EasyMock.*;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.geotools.data.simple.SimpleFeatureCollection;
+
+public class DecoratingSimpleFeatureCollectionTest extends TestCase {
+
+ public void testAccepts() throws IOException {
+
+ SimpleFeatureCollection mock = createMock(SimpleFeatureCollection.class);
+ mock.accepts(null, null);
+ expectLastCall().once();
+ replay(mock);
+
+ DecoratingSimpleFeatureCollection col = new DecoratingSimpleFeatureCollection(mock);
+ col.accepts(null, null);
+
+ verify(mock);
+ }
+}

0 comments on commit 697e6da

Please sign in to comment.
Something went wrong with that request. Please try again.