Beispiel #1
0
        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);
        }
Beispiel #2
0
 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 async Task <IEnumerable <QualifiedBonus> > GetVisibleDepositQualifiedBonuses()
        {
            var response = await _memberApiProxy.GetVisibleDepositQualifiedBonuses(new QualifiedBonusRequest
            {
                Amount = null
            });

            return(response);
        }
Beispiel #4
0
        public void ThenIShouldSeeStatusCodeBadRequest(int p0)
        {
            Assert.Throws <MemberApiValidationException>(async() => await MemberApiProxy.GetRedemption(Guid.NewGuid()));
            Assert.Throws <MemberApiValidationException>(
                async() => await MemberApiProxy.GetFirstDepositBonuseByCode(new FirstDepositApplicationRequest()
            {
                DepositAmount = 10,
                BonusCode     = Guid.NewGuid().ToString(),
                PlayerId      = Guid.NewGuid()
            }));

            Assert.Throws <MemberApiValidationException>(async() => await MemberApiProxy.GetVisibleDepositQualifiedBonuses(new QualifiedBonusRequest()
            {
                Amount = 100
            }));
        }