Exemple #1
0
        private async Task RequestContentItemAndStoreResponseAsync(string slug, string id, string etag)
        {
            string resolvedSlug = SpecHelpers.ParseSpecValue <string>(this.scenarioContext, slug);
            string resolvedId   = SpecHelpers.ParseSpecValue <string>(this.scenarioContext, id);

            ContentClient client = this.featureContext.Get <ContentClient>();

            try
            {
                SwaggerResponse <ContentResponse> response = await client.GetContentAsync(
                    this.featureContext.GetCurrentTenantId(),
                    resolvedSlug,
                    resolvedId,
                    etag).ConfigureAwait(false);

                this.scenarioContext.StoreLastApiResponse(response);
            }
            catch (SwaggerException ex)
            {
                this.scenarioContext.StoreLastApiException(ex);
            }
        }