Beispiel #1
0
        public override void BeforeEach()
        {
            base.BeforeEach();

            Balance = new BonusBalance();
            var bonusApiMock = new Mock <IBonusApiProxy>();

            bonusApiMock.Setup(proxy => proxy.GetPlayerBalanceAsync(It.IsAny <Guid>(), It.IsAny <Guid?>())).ReturnsAsync(Balance);
            bonusApiMock.Setup(proxy => proxy.GetWageringBalancesAsync(It.IsAny <Guid>(), It.IsAny <Guid?>())).ReturnsAsync(new PlayerWagering());
            Container.RegisterInstance(bonusApiMock.Object);

            _withdrawalService = Container.Resolve <IWithdrawalService>();
            _playerQueries     = Container.Resolve <PlayerQueries>();
            _paymentRepository = Container.Resolve <FakePaymentRepository>();
            _paymentTestHelper = Container.Resolve <PaymentTestHelper>();
            Container.Resolve <PaymentWorker>().Start();
            var securityTestHelper = Container.Resolve <SecurityTestHelper>();

            securityTestHelper.PopulatePermissions();
            securityTestHelper.CreateAndSignInSuperAdmin();

            var brandHelper = Container.Resolve <BrandTestHelper>();
            var brand       = brandHelper.CreateActiveBrandWithProducts();

            var player = Container.Resolve <PlayerTestHelper>().CreatePlayer();

            _paymentTestHelper.CreatePlayerBankAccount(player.Id, brand.Id, true);

            _player = _playerQueries.GetPlayers().ToList().First();

            _observedWithdrawalId = Guid.NewGuid();
        }
        public override void BeforeEach()
        {
            base.BeforeEach();

            Balance = new BonusBalance();
            var bonusApiMock = new Mock <IBonusApiProxy>();

            bonusApiMock.Setup(proxy => proxy.GetPlayerBalanceAsync(It.IsAny <Guid>(), It.IsAny <Guid?>())).ReturnsAsync(Balance);
            Container.RegisterInstance(bonusApiMock.Object);

            _withdrawalService = Container.Resolve <IWithdrawalService>();
            _paymentRepository = Container.Resolve <FakePaymentRepository>();

            _gameRepository = Container.Resolve <FakeGameRepository>();
            _gameRepository.SavedChanges += (s, e) =>
            {
                var allGameActions = _gameRepository.Rounds
                                     .SelectMany(o => o.GameActions);

                foreach (var gameAction in allGameActions)
                {
                    if (Enumerable.Any(_gameRepository.GameActions, o => o.Id == gameAction.Id))
                    {
                        continue;
                    }

                    gameAction.Round.Game = _gameRepository.Games
                                            .Single(o => o.Id == gameAction.Round.GameId);

                    _gameRepository.GameActions.Add(gameAction);
                }
            };

            _actorInfoProvider        = Container.Resolve <IActorInfoProvider>();
            _paymentTestHelper        = Container.Resolve <PaymentTestHelper>();
            _gamesTestHelper          = Container.Resolve <GamesTestHelper>();
            _avcConfigurationCommands = Container.Resolve <IAVCConfigurationCommands>();
            _brandQueries             = Container.Resolve <BrandQueries>();
            _fraudRepository          = Container.Resolve <IFraudRepository>();

            var securityTestHelper = Container.Resolve <SecurityTestHelper>();

            securityTestHelper.PopulatePermissions();
            securityTestHelper.CreateAndSignInSuperAdmin();
            Container.Resolve <RiskLevelWorker>().Start();
            Container.Resolve <PaymentWorker>().Start();
            var brandHelper = Container.Resolve <BrandTestHelper>();
            var brand       = brandHelper.CreateActiveBrandWithProducts();

            player = Container.Resolve <PlayerTestHelper>().CreatePlayer();
            var bankAccount = _paymentTestHelper.CreatePlayerBankAccount(player.Id, brand.Id, true);

            bankAccount.Player.DateRegistered = DateTimeOffset.Now.AddMonths(-1);
        }
        public override void BeforeEach()
        {
            base.BeforeEach();

            _driver.Logout();
            _playerTestHelper  = _container.Resolve <PlayerTestHelper>();
            _paymentTestHelper = _container.Resolve <PaymentTestHelper>();
            _player            = _playerTestHelper.CreatePlayer();
            _playerBankAccount = _paymentTestHelper.CreatePlayerBankAccount(_player.Id, _player.BrandId);

            _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin();
            _playerBankAccountVerifyPage = _dashboardPage.Menu.ClickPlayerBankAccountVerifyMenuItem();
        }
        public override void BeforeEach()
        {
            base.BeforeEach();

            _brandOperations       = Container.Resolve <IBrandOperations>();
            _gameRepository        = Container.Resolve <IGameRepository>();
            _onlineDepositCommands = Container.Resolve <IOnlineDepositCommands>();
            _onlineDepositQueries  = Container.Resolve <IOnlineDepositQueries>();
            _playerQueries         = Container.Resolve <PlayerQueries>();
            _reportQueries         = Container.Resolve <ReportQueries>();

            _testPlayer = Container.Resolve <PlayerTestHelper>().CreatePlayer();
            WaitForPlayerRegistered(_testPlayer.Id);
        }
        public override void BeforeEach()
        {
            base.BeforeEach();

            mockAwcChec = new Mock <IAWCValidationService>();
            Container.RegisterInstance(mockAwcChec.Object);
            mockBonusWageringCheck = new Mock <IBonusWageringWithdrawalValidationService>();
            Container.RegisterInstance(mockBonusWageringCheck.Object);
            mockPaymentSettingsCheck = new Mock <IPaymentSettingsValidationService>();
            Container.RegisterInstance(mockPaymentSettingsCheck.Object);
            mockManualAdjWageringCheck = new Mock <IManualAdjustmentWageringValidationService>();
            Container.RegisterInstance(mockManualAdjWageringCheck.Object);
            mockRebateValidationCheck = new Mock <IRebateWageringValidationService>();
            Container.RegisterInstance(mockRebateValidationCheck.Object);
            mockFundsValidationCheck = new Mock <IFundsValidationService>();
            Container.RegisterInstance(mockFundsValidationCheck.Object);
            _withdrawalService = Container.Resolve <IWithdrawalService>();
            _playerQueries     = Container.Resolve <PlayerQueries>();
            _paymentRepository = Container.Resolve <FakePaymentRepository>();
            _actorInfoProvider = Container.Resolve <IActorInfoProvider>();
            _paymentTestHelper = Container.Resolve <PaymentTestHelper>();
            _gamesTestHelper   = Container.Resolve <GamesTestHelper>();
            Container.Resolve <PaymentWorker>().Start();
            var securityTestHelper = Container.Resolve <SecurityTestHelper>();

            securityTestHelper.PopulatePermissions();
            securityTestHelper.CreateAndSignInSuperAdmin();

            var brandHelper = Container.Resolve <BrandTestHelper>();
            var brand       = brandHelper.CreateActiveBrandWithProducts();

            var player = Container.Resolve <PlayerTestHelper>().CreatePlayer();

            _paymentTestHelper.CreatePlayerBankAccount(player.Id, brand.Id, true);

            _player = _playerQueries.GetPlayers().ToList().First();
        }