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

            try
            {
                ContentClient client = this.featureContext.Get <ContentClient>();
                SwaggerResponse <ContentSummaryResponse> response = await client.GetContentSummaryAsync(
                    this.featureContext.GetCurrentTenantId(),
                    resolvedSlug,
                    resolvedId,
                    etag).ConfigureAwait(false);

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