Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

GEOT-4457 - passing through accepts method

  • Loading branch information...
commit 697e6da9659fee7a9534fd41a8f7c7d573b4c246 1 parent 573031d
Justin Deoliveira jdeolive authored
2  modules/library/main/src/main/java/org/geotools/feature/collection/DecoratingSimpleFeatureCollection.java
@@ -57,7 +57,7 @@ protected DecoratingSimpleFeatureCollection(SimpleFeatureCollection delegate) {
57 57
58 58 public void accepts(org.opengis.feature.FeatureVisitor visitor,
59 59 org.opengis.util.ProgressListener progress) throws IOException {
60   - DataUtilities.visit(this, visitor, progress);
  60 + delegate.accepts(visitor, progress);
61 61 }
62 62
63 63
41 ...es/library/main/src/test/java/org/geotools/feature/collection/DecoratingSimpleFeatureCollectionTest.java
... ... @@ -0,0 +1,41 @@
  1 +/*
  2 + * GeoTools - The Open Source Java GIS Toolkit
  3 + * http://geotools.org
  4 + *
  5 + * (C) 2002-2013, Open Source Geospatial Foundation (OSGeo)
  6 + *
  7 + * This library is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public
  9 + * License as published by the Free Software Foundation;
  10 + * version 2.1 of the License.
  11 + *
  12 + * This library is distributed in the hope that it will be useful,
  13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15 + * Lesser General Public License for more details.
  16 + */
  17 +package org.geotools.feature.collection;
  18 +
  19 +import static org.easymock.EasyMock.*;
  20 +
  21 +import java.io.IOException;
  22 +
  23 +import junit.framework.TestCase;
  24 +
  25 +import org.geotools.data.simple.SimpleFeatureCollection;
  26 +
  27 +public class DecoratingSimpleFeatureCollectionTest extends TestCase {
  28 +
  29 + public void testAccepts() throws IOException {
  30 +
  31 + SimpleFeatureCollection mock = createMock(SimpleFeatureCollection.class);
  32 + mock.accepts(null, null);
  33 + expectLastCall().once();
  34 + replay(mock);
  35 +
  36 + DecoratingSimpleFeatureCollection col = new DecoratingSimpleFeatureCollection(mock);
  37 + col.accepts(null, null);
  38 +
  39 + verify(mock);
  40 + }
  41 +}

0 comments on commit 697e6da

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