/// <summary>
        /// Return the legend descriptions details for the requested endpoint
        /// </summary>
        /// <returns>The legend descriptions details</returns>
        public virtual Task <LegendsDescriptionResponse> DescribeLegends(LegendsDescription legendDescriptionRequest, CancellationToken ct = default(CancellationToken))
        {
            if (legendDescriptionRequest == null)
            {
                throw new ArgumentNullException(nameof(legendDescriptionRequest));
            }

            return(Get <LegendsDescriptionResponse, LegendsDescription>(legendDescriptionRequest, ct));
        }
Exemple #2
0
        public async Task CanDescribeLegend2(string rootUrl, string mapUrl, int?dpi, int?size)
        {
            var gateway = new PortalGateway(rootUrl);
            var request = new LegendsDescription(mapUrl.AsEndpoint());

            request.Dpi = dpi;
            if (size.HasValue)
            {
                request.Size = new List <int>();
                request.Size.Add(size.Value);
                request.Size.Add(size.Value);
            }
            var layerResponse = await IntegrationTestFixture.TestPolicy.Execute(() =>
            {
                return(gateway.DescribeLegends(request));
            });

            Assert.NotNull(layerResponse);
            Assert.Null(layerResponse.Error);
            Assert.NotNull(layerResponse.Layers);
            Assert.True(layerResponse.Layers.Any());
        }