public override void BeforeEach()
        {
            base.BeforeEach();

            BonusBalance = new BonusBalance {
                Main = 10
            };
            var bonusApiMock = new Mock <IBonusApiProxy>();

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

            Container.Resolve <PaymentWorker>().Start();
            var brandTestHelper    = Container.Resolve <BrandTestHelper>();
            var securityTestHelper = Container.Resolve <SecurityTestHelper>();

            securityTestHelper.PopulatePermissions();
            securityTestHelper.CreateAndSignInSuperAdmin();
            _brand = brandTestHelper.CreateBrand(isActive: true);

            var player = Container.Resolve <PlayerTestHelper>().CreatePlayer(true, _brand.Id);

            _playerId          = player.Id;
            _walletTemplateId  = _brand.WalletTemplates.Single(x => x.IsMain).Id;
            _validationService = Container.Resolve <ITransferFundValidationService>();
            _repository        = Container.Resolve <FakePaymentRepository>();

            _transferFundTestHelper = Container.Resolve <TransferFundTestHelper>();
            _paymentTestHelper      = Container.Resolve <PaymentTestHelper>();
        }
Exemplo n.º 2
0
 public TransferFundCommands(
     IPaymentRepository repository,
     ITransferFundValidationService validationService,
     BrandQueries brandQueries,
     IEventBus eventBus,
     IBonusApiProxy bonusApiProxy)
 {
     _repository        = repository;
     _validationService = validationService;
     _brandQueries      = brandQueries;
     _eventBus          = eventBus;
     _bonusApiProxy     = bonusApiProxy;
 }