public void ThenIShouldSeeStatusCodeSuccessfulAndResponseSchemaValidated(int p0) { Assert.DoesNotThrow(async() => await MemberApiProxy.BonusRedemptionsAsync()); Assert.DoesNotThrow(async() => await MemberApiProxy.GetRedemption(Guid.NewGuid())); Assert.DoesNotThrow(async() => await MemberApiProxy.GetQualifiedBonuses(new QualifiedBonusRequest() { Amount = 10 })); Assert.DoesNotThrow(async() => await MemberApiProxy.QualifiedFirstDepositBonuses(new QualifiedBonusRequest() { Amount = 10 })); Assert.DoesNotThrow(async() => await MemberApiProxy.GetFirstDepositBonuseByCode(new FirstDepositApplicationRequest())); Assert.DoesNotThrow(async() => await MemberApiProxy.ValidateFirstOnlineDeposit(new FirstDepositApplicationRequest() { BonusCode = TestDataGenerator.GetRandomString(4), DepositAmount = 50 })); Assert.DoesNotThrow(async() => await MemberApiProxy.GetCompleteBonuses()); Assert.DoesNotThrow(async() => await MemberApiProxy.GetBonusesWithIncompleteWagering()); Assert.DoesNotThrow(async() => await MemberApiProxy.GetVisibleDepositQualifiedBonuses(new QualifiedBonusRequest() { Amount = 10 })); }
public void WhenITryToSendRequestToBonusControllerAPI(string p0) { ErrorMessagesFromUnauthorizedCalls.Add(Assert.Throws <MemberApiProxyException>( async() => await MemberApiProxy.BonusRedemptionsAsync()).Exception.ErrorMessage); ErrorMessagesFromUnauthorizedCalls.Add(Assert.Throws <MemberApiProxyException>( async() => await MemberApiProxy.GetQualifiedBonuses(new QualifiedBonusRequest())).Exception.ErrorMessage); ErrorMessagesFromUnauthorizedCalls.Add(Assert.Throws <MemberApiProxyException>( async() => await MemberApiProxy.QualifiedFirstDepositBonuses(new QualifiedBonusRequest())).Exception.ErrorMessage); ErrorMessagesFromUnauthorizedCalls.Add(Assert.Throws <MemberApiProxyException>( async() => await MemberApiProxy.GetFirstDepositBonuseByCode(new FirstDepositApplicationRequest())).Exception.ErrorMessage); ErrorMessagesFromUnauthorizedCalls.Add(Assert.Throws <MemberApiProxyException>( async() => await MemberApiProxy.ValidateFirstOnlineDeposit(new FirstDepositApplicationRequest())).Exception.ErrorMessage); ErrorMessagesFromUnauthorizedCalls.Add(Assert.Throws <MemberApiProxyException>( async() => await MemberApiProxy.GetCompleteBonuses()).Exception.ErrorMessage); ErrorMessagesFromUnauthorizedCalls.Add(Assert.Throws <MemberApiProxyException>( async() => await MemberApiProxy.GetBonusesWithIncompleteWagering()).Exception.ErrorMessage); ErrorMessagesFromUnauthorizedCalls.Add(Assert.Throws <MemberApiProxyException>( async() => await MemberApiProxy.GetVisibleDepositQualifiedBonuses(new QualifiedBonusRequest() { Amount = 10 })).Exception.ErrorMessage); }
public void ThenIShouldSeeStatusForNotAvailableService() { Assert.That( Assert.Throws <MemberApiProxyException>(async() => await MemberApiProxy.GetCompleteBonuses()) .StatusCode, Is.EqualTo(HttpStatusCode.InternalServerError)); Assert.That( Assert.Throws <MemberApiProxyException>(async() => await MemberApiProxy.GetBonusesWithIncompleteWagering()) .StatusCode, Is.EqualTo(HttpStatusCode.InternalServerError)); ServiceLayerMockingHelper.VerifyLogginServiceWasCalledAfterInternalServerError(2); }