コード例 #1
0
 public OfflineWithdrawController(
     IWithdrawalService service,
     IPaymentQueries paymentQueries,
     IAdminQueries adminQueries,
     IWithdrawalVerificationLogsQueues withdrawalVerificationLogsQueues,
     IActorInfoProvider actorInfoProvider)
 {
     _service        = service;
     _paymentQueries = paymentQueries;
     _adminQueries   = adminQueries;
     _withdrawalVerificationLogsQueues = withdrawalVerificationLogsQueues;
     _actorInfoProvider = actorInfoProvider;
 }
        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);

            Container.Resolve <PaymentWorker>().Start();

            _withdrawalService = Container.Resolve <IWithdrawalService>();
            _playerQueries     = Container.Resolve <PlayerQueries>();
            _paymentRepository = Container.Resolve <FakePaymentRepository>();
            _paymentTestHelper = Container.Resolve <PaymentTestHelper>();
            _withdrawalVerificationLogsQueues = Container.Resolve <IWithdrawalVerificationLogsQueues>();
            _riskLevelQueries = Container.Resolve <IRiskLevelQueries>();

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

            securityTestHelper.PopulatePermissions();
            securityTestHelper.CreateAndSignInSuperAdmin();
            _gamesTestHelper = Container.Resolve <GamesTestHelper>();

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

            _brandQueries = Container.Resolve <BrandQueries>();

            _actorInfoProvider = Container.Resolve <IActorInfoProvider>();

            _avcConfigurationCommands = Container.Resolve <IAVCConfigurationCommands>();
            _riskProfileCheckCommands = Container.Resolve <IRiskProfileCheckCommands>();

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

            _paymentTestHelper.CreatePlayerBankAccount(player.Id, brand.Id, true);
            _observedBrand = _brandQueries.GetBrands().First();

            brandHelper.CreateRiskLevel(_observedBrand.Id);

            //Replace with risk levels from fraud repository
            var availableRiskLevels = _riskLevelQueries.GetByBrand(_observedBrand.Id);

            _observedRiskLevel = availableRiskLevels.FirstOrDefault().Id;

            _riskLevelDifferentThanObserved = availableRiskLevels.First(rl => rl.Id != _observedRiskLevel).Id;
        }
コード例 #3
0
 public AVCValidationService(
     IAVCConfigurationQueries avcConfigurationQueries,
     IPaymentRepository paymentRepository,
     IRiskLevelQueries riskLevelQueries,
     IGameQueries gameQueries,
     IWalletQueries walletQueries,
     IWithdrawalVerificationLogsCommands logsCommands,
     IWithdrawalVerificationLogsQueues withdrawalVerificationLogsQueues,
     IEventBus eventBus, IPlayerIdentityValidator identityValidator)
     : base(paymentRepository, riskLevelQueries, walletQueries)
 {
     _avcConfigurationQueries          = avcConfigurationQueries;
     _paymentRepository                = paymentRepository;
     _gameQueries                      = gameQueries;
     _logsCommands                     = logsCommands;
     _withdrawalVerificationLogsQueues = withdrawalVerificationLogsQueues;
     _eventBus          = eventBus;
     _identityValidator = identityValidator;
 }