async Task Buffer(PortalGatewayBase gateway, List <Feature <Polygon> > features, SpatialReference spatialReference) { int featuresCount = features.Count; double distance = 10.0; var featuresBuffered = await new ArcGISOnlineGateway(new ServiceStackSerializer()).Buffer <Polygon>(features, spatialReference, distance); Assert.NotNull(featuresBuffered); Assert.Equal(featuresCount, featuresBuffered.Count); }
async Task Buffer(PortalGatewayBase gateway, List <Feature <Polygon> > features, SpatialReference spatialReference) { int featuresCount = features.Count; double distance = 10.0; var featuresBuffered = await IntegrationTestFixture.TestPolicy.ExecuteAsync(() => { return(new ArcGISOnlineGateway().Buffer <Polygon>(features, spatialReference, distance)); }); Assert.NotNull(featuresBuffered); Assert.Equal(featuresCount, featuresBuffered.Count); }
async Task Buffer(PortalGatewayBase gateway, List <Feature <Polygon> > features, SpatialReference spatialReference) { int featuresCount = features.Count; double distance = 10.0; var featuresBuffered = await gateway.Buffer <Polygon>(features, spatialReference, distance); Assert.NotNull(featuresBuffered); Assert.Equal(featuresCount, featuresBuffered.Count); for (int indexFeature = 0; indexFeature < featuresCount; ++indexFeature) { // Should be more complex shape, so expect greater number of points. Assert.True(featuresBuffered[indexFeature].Geometry.Rings[0].Points.Count > features[indexFeature].Geometry.Rings[0].Points.Count, "Expecting buffered polygon to contain more points than original"); } }