Beispiel #1
0
        public async Task ThenIShouldSeeStatusCodeCreatedAndResponseSchemaValidated(int p0)
        {
            //Act
            ScenarioContext.Current[ClaimedBonusRedemption] =
                await MemberApiProxy.ClaimRedemptionAsync(new ClaimRedemptionRequest());

            //From this point on we check if the returned by the POST uri is not empty
            ScenarioContext.Current[ClaimedBonusRedemption].Should().NotBeNull();

            var uriToClaimedRedemption = ((ClaimRedemptionResponse)
                                          (ScenarioContext.Current[ClaimedBonusRedemption]))
                                         .UriToClaimedRedemption;

            uriToClaimedRedemption.Should()
            .NotBeEmpty();

            //From this point on we check if the returned by the POST uri is accurate and working
            using (var client = new HttpClient())
            {
                AssignDefaultHeaderValues(client);

                CheckUpdatedEntityAvailability(client,
                                               uriToClaimedRedemption.Split('?')[0],
                                               uriToClaimedRedemption.Split('?')[1]);
            }
        }
 public async Task <ClaimRedemptionResponse> ClaimBonusReward(ClaimRedemptionRequest request)
 {
     return(await _memberApiProxy.ClaimRedemptionAsync(request));
 }