Permalink
Browse files

GEOT-4457 - passing through accepts method

  • Loading branch information...
1 parent 573031d commit 697e6da9659fee7a9534fd41a8f7c7d573b4c246 jdeolive committed May 1, 2013
@@ -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);
}
@@ -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.