示例#1
0
        public async Task CanDownloadExportMapResponse(string rootUrl, string relativeUrl)
        {
            var gateway = new PortalGateway(rootUrl);

            var exportMapResult = await IntegrationTestFixture.TestPolicy.ExecuteAsync(() =>
            {
                return(gateway.ExportMap(new ExportMap(relativeUrl)
                {
                    ExportExtent = new Extent
                    {
                        XMin = -28695213.908633016,
                        YMin = -32794.530181307346,
                        XMax = 28695213.908633016,
                        YMax = 19971868.880408566,
                        SpatialReference = SpatialReference.WebMercator
                    }
                }));
            });

            var result = await IntegrationTestFixture.TestPolicy.ExecuteAsync(() =>
            {
                return(gateway.DownloadExportMapToLocal(exportMapResult, @"c:\temp\_tests_"));
            });

            Assert.NotNull(result);
            Assert.NotNull(result.FullName);
            Assert.True(result.Exists);
        }