Beispiel #1
0
        public void ThenIShouldSeeStatusCodeIndicatingInternalServerError(int p0)
        {
            Assert.That(
                Assert.Throws <MemberApiProxyException>(async() => await MemberApiProxy.GetOnSiteMessagesAsync())
                .StatusCode,
                Is.EqualTo(HttpStatusCode.InternalServerError));

            Assert.That(
                Assert.Throws <MemberApiProxyException>(async() => await MemberApiProxy.GetBalancesSetAsync())
                .StatusCode,
                Is.EqualTo(HttpStatusCode.InternalServerError));

            Assert.That(
                Assert.Throws <MemberApiProxyException>(
                    () => MemberApiProxy.GetAvailableLanguages(Guid.NewGuid())).StatusCode,
                Is.EqualTo(HttpStatusCode.InternalServerError));

            Assert.That(
                Assert.Throws <MemberApiProxyException>(
                    async() => await MemberApiProxy.RegistrationFormDataAsync(new RegistrationFormDataRequest()
            {
                BrandId = Guid.NewGuid()
            })).StatusCode,
                Is.EqualTo(HttpStatusCode.InternalServerError));

            Assert.That(
                Assert.Throws <MemberApiProxyException>(
                    async() => await MemberApiProxy.ArePlayersIdDocumentsValid()).StatusCode,
                Is.EqualTo(HttpStatusCode.InternalServerError));

            ServiceLayerMockingHelper.VerifyLogginServiceWasCalledAfterInternalServerError(5);
        }
Beispiel #2
0
        public void ThenIShouldSeeStatusCodeSuccessfulForEach(int p0, string p1)
        {
            Assert.DoesNotThrow(async() => await MemberApiProxy.ProfileAsync());
            Assert.DoesNotThrow(async() => await MemberApiProxy.SecurityQuestionsAsync());
            Assert.DoesNotThrow(async() => await MemberApiProxy.GetBalancesSetAsync());
            Assert.DoesNotThrow(async() => await MemberApiProxy.GetAcknowledgementDataAsync(Guid.NewGuid()));
            Assert.DoesNotThrow(
                async() =>
                await
                MemberApiProxy.GetOnSiteMessageAsync(new OnSiteMessageRequest()
            {
                OnSiteMessageId = Guid.NewGuid()
            }));
            Assert.DoesNotThrow(async() => await MemberApiProxy.GetOnSiteMessagesAsync());
            Assert.DoesNotThrow(async() => await MemberApiProxy.GetOnSiteMessagesCountAsync());

            Assert.DoesNotThrow(async() => await MemberApiProxy.GetWalletsAsync(Guid.NewGuid()));
            Assert.DoesNotThrow(async() => await MemberApiProxy.GetPlayerData(TestDataGenerator.GetRandomString()));
            Assert.DoesNotThrow(async() => await MemberApiProxy.ArePlayersIdDocumentsValid());

            //Test anonymous requests
            SetInvalidToken();
            Assert.DoesNotThrow(async() => await MemberApiProxy.GetSecurityQuestionAsync(Guid.NewGuid()));

            Assert.DoesNotThrow(
                async() =>
                await
                MemberApiProxy.RegistrationFormDataAsync(new RegistrationFormDataRequest()
            {
                BrandId = Guid.NewGuid()
            }));

            Assert.DoesNotThrow(() => MemberApiProxy.GetAvailableLanguages(Guid.NewGuid()));
            Assert.DoesNotThrow(async() => await MemberApiProxy.GetAcknowledgementDataAsync(Guid.NewGuid()));
            Assert.DoesNotThrow(async() => await MemberApiProxy.GetPlayerByResetPasswordToken(Token));
        }