public override void BeforeEach() { base.BeforeEach(); _withdrawalService = Container.Resolve <IWithdrawalService>(); _playerQueries = Container.Resolve <PlayerQueries>(); _paymentRepository = Container.Resolve <FakePaymentRepository>(); _actorInfoProvider = Container.Resolve <IActorInfoProvider>(); _paymentTestHelper = Container.Resolve <PaymentTestHelper>(); _gamesTestHelper = Container.Resolve <GamesTestHelper>(); _walletQueries = Container.Resolve <IWalletQueries>(); _walletRepository = Container.Resolve <GameRepository>(); var securityTestHelper = Container.Resolve <SecurityTestHelper>(); securityTestHelper.PopulatePermissions(); securityTestHelper.CreateAndSignInSuperAdmin(); Container.Resolve <PaymentWorker>().Start(); var brandHelper = Container.Resolve <BrandTestHelper>(); var brand = brandHelper.CreateActiveBrandWithProducts(); var player = Container.Resolve <PlayerTestHelper>().CreatePlayer(); _paymentTestHelper.CreatePlayerBankAccount(player.Id, brand.Id, true); }
public void Can_process_submit_deposit() { // Arrange var depositAmount = TestDataGenerator.GetRandomDepositAmount(); // Act var deposit = PaymentTestHelper.CreateOfflineDeposit(_player.Id, depositAmount); // Assert Assert.AreEqual(1, _reportRepository.DepositRecords.Count()); var record = _reportRepository.DepositRecords.Single(); Assert.AreEqual(CurrentBrand.Name, record.Brand); Assert.AreEqual(CurrentBrand.Licensee.Name, record.Licensee); Assert.AreEqual(_player.Username, record.Username); Assert.AreEqual(_player.InternalAccount, record.IsInternalAccount); Assert.AreEqual(deposit.TransactionNumber, record.TransactionId); Assert.AreEqual(deposit.Id, record.DepositId); Assert.AreEqual("Offline-Bank", record.PaymentMethod); Assert.AreEqual(deposit.CurrencyCode, record.Currency); Assert.AreEqual(depositAmount, record.Amount); Assert.AreEqual(OfflineDepositStatus.New.ToString(), record.Status); Assert.Less(DateTimeOffset.Now.AddDays(-2), record.Submitted); Assert.AreEqual(_actorInfoProvider.Actor.UserName, record.SubmittedBy); Assert.AreEqual(deposit.DepositType.ToString(), record.DepositType); Assert.AreEqual(deposit.BankAccount.AccountName, record.BankAccountName); Assert.AreEqual(deposit.BankAccount.AccountId, record.BankAccountId); Assert.AreEqual("Test Bank", record.BankName); Assert.AreEqual("Province", record.BankProvince); Assert.AreEqual("Branch", record.BankBranch); Assert.AreEqual(deposit.BankAccount.AccountNumber, record.BankAccountNumber); }
public void Can_unverify_deposit() { // create a player _playerTestHelper = _container.Resolve <PlayerTestHelper>(); _paymentTestHelper = _container.Resolve <PaymentTestHelper>(); var player = _playerTestHelper.CreatePlayer(true, DefaultBrandId); // create and confirm offline deposit var deposit = _paymentTestHelper.CreateOfflineDeposit(player.Id, Amount); _paymentTestHelper.ConfirmOfflineDeposit(deposit); var referenceCode = deposit.TransactionNumber; //var referenceCode = deposit.BankReferenceNumber; // unverify offline deposit _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin(); var playerDepositVerifyPage = _dashboardPage.Menu.ClickPlayerDepositVerifyItem(); playerDepositVerifyPage.FilterGrid(player.Username); playerDepositVerifyPage.SelectConfirmedDeposit(referenceCode); var unverifyForm = playerDepositVerifyPage.OpenUnverifyForm(); unverifyForm.EnterRemarks(" This deposit is unverified."); unverifyForm.Submit(); Assert.AreEqual("Offline deposit request has been unverified successfully", unverifyForm.ConfirmationMessage); Assert.AreEqual(referenceCode, unverifyForm.ReferenceCode); Assert.AreEqual("Unverified", unverifyForm.Status); }
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(); 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>(); }
public override void BeforeEach() { base.BeforeEach(); _withdrawalService = Container.Resolve <IWithdrawalService>(); 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); _playerQueries = Container.Resolve <PlayerQueries>(); _paymentRepository = Container.Resolve <FakePaymentRepository>(); Container.Resolve <PaymentWorker>().Start(); _paymentTestHelper = Container.Resolve <PaymentTestHelper>(); _avcConfigurationCommands = Container.Resolve <IAVCConfigurationCommands>(); _brandQueries = Container.Resolve <BrandQueries>(); var securityTestHelper = Container.Resolve <SecurityTestHelper>(); securityTestHelper.PopulatePermissions(); securityTestHelper.CreateAndSignInSuperAdmin(); var brandHelper = Container.Resolve <BrandTestHelper>(); var brand = brandHelper.CreateActiveBrandWithProducts(); var player = Container.Resolve <PlayerTestHelper>().CreatePlayer(); player.DateRegistered = DateTimeOffset.Now.AddMonths(-1); _paymentTestHelper.CreatePlayerBankAccount(player.Id, brand.Id, true); }
public override void BeforeEach() { base.BeforeEach(); Container.Resolve <PaymentWorker>().Start(); _paymentTestHelper = Container.Resolve <PaymentTestHelper>(); var securityTestHelper = Container.Resolve <SecurityTestHelper>(); securityTestHelper.PopulatePermissions(); securityTestHelper.CreateAndSignInSuperAdmin(); var brandTestHelper = Container.Resolve <BrandTestHelper>(); var licensee = brandTestHelper.CreateLicensee(); var brand = brandTestHelper.CreateBrand(licensee, isActive: true); _paymentRepository = Container.Resolve <IPaymentRepository>(); _paymentRepository.Countries.Add(new Country { Code = "UA", Name = "Ukraine" }); var playerTestHelper = Container.Resolve <PlayerTestHelper>(); var player = playerTestHelper.CreatePlayer(brandId: brand.Id); _player = _paymentRepository.Players.Single(x => x.Id == player.Id); var paymentLevel = _paymentTestHelper.CreatePaymentLevel(brand.Id, "CAD"); _paymentTestHelper.CreatePlayerPaymentLevel(_player.Id, paymentLevel); var busMock = new Mock <IEventBus>(); var offlineDepositValidator = new Mock <IPaymentSettingsValidator>(); var actorInfoProvider = Container.Resolve <IActorInfoProvider>(); var playerIdentityValidator = new Mock <IPlayerIdentityValidator>(); playerIdentityValidator.Setup(o => o.Validate(It.IsAny <Guid>(), It.IsAny <Core.Common.Data.Player.TransactionType>())); var docService = new Mock <IDocumentService>().Object; _commandsHandler = new OfflineDepositCommands( _paymentRepository, Container.Resolve <IPaymentQueries>(), busMock.Object, offlineDepositValidator.Object, actorInfoProvider, playerIdentityValidator.Object, docService, Container.Resolve <IOfflineDepositQueries>(), Container.Resolve <IServiceBus>(), Container.Resolve <IBonusApiProxy>(), Container.Resolve <IMessageTemplateService>()); _bankAccount = _paymentTestHelper.CreateBankAccount(brand.Id, player.CurrencyCode); offlineDepositValidator .Setup(o => o.Validate(It.IsAny <Guid>(), It.IsAny <string>(), It.IsAny <decimal>())) .Callback((Guid param1, string param2, decimal param3) => { }); }
public override void BeforeEach() { base.BeforeEach(); _gameRepository = Container.Resolve <IGameRepository>(); _brandOperations = Container.Resolve <BrandOperations>(); PlayerTestHelper = Container.Resolve <PlayerTestHelper>(); PaymentTestHelper = Container.Resolve <PaymentTestHelper>(); }
public override void BeforeEach() { base.BeforeEach(); _driver.Logout(); _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin(); _menu = _dashboardPage.Menu; _paymentTestHelper = _container.Resolve <PaymentTestHelper>(); _bonusName = TestDataGenerator.GetRandomString(12); _bonusTemplateName = TestDataGenerator.GetRandomString(12); }
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(); _paymentRepositoryMock = Container.Resolve <FakePaymentRepository>(); _depositCommands = Container.Resolve <IOnlineDepositCommands>(); _depositQueries = Container.Resolve <IOnlineDepositQueries>(); _paymentTestHelper = Container.Resolve <PaymentTestHelper>(); _actorInfoProvider = Container.Resolve <IActorInfoProvider>(); //Add Testing Data GenerateTestingData(); }
public override void BeforeEach() { base.BeforeEach(); _playerRepository = Container.Resolve <IPlayerRepository>(); _paymentRepository = Container.Resolve <IPaymentRepository>(); _securityTestHelper = Container.Resolve <SecurityTestHelper>(); _securityTestHelper.PopulatePermissions(); _securityTestHelper.CreateAndSignInSuperAdmin(); _paymentTestHelper = Container.Resolve <PaymentTestHelper>(); _brandTestHelper = Container.Resolve <BrandTestHelper>(); _playerTestHelper = Container.Resolve <PlayerTestHelper>(); _playerCommands = Container.Resolve <PlayerCommands>(); }
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; }
public override void BeforeEach() { base.BeforeEach(); Container.Resolve <PaymentWorker>().Start(); _reportRepository = Container.Resolve <IReportRepository>(); _gamesTestHelper = Container.Resolve <GamesTestHelper>(); _reportQueries = Container.Resolve <ReportQueries>(); _random = new Random(); _player = Container.Resolve <PlayerTestHelper>().CreatePlayer(); PaymentTestHelper.MakeDeposit(_player.Id, 1000000); _game = _gamesTestHelper.GetMainWalletGame(_player.Id); }
public override void BeforeAll() { base.BeforeAll(); //create a player _playerTestHelper = _container.Resolve<PlayerTestHelper>(); _paymentTestHelper = _container.Resolve<PaymentTestHelper>(); _player = _playerTestHelper.CreatePlayerForMemberWebsite(currencyCode: "CAD"); //deposit money to the player's main balance _paymentTestHelper.MakeDeposit(_player.Username, DepositAmount); //navigate to brand website _brandWebsiteLoginPage = new MemberWebsiteLoginPage(_driver); _brandWebsiteLoginPage.NavigateToMemberWebsite(); }
public override void BeforeAll() { base.BeforeAll(); _paymentTestHelper = _container.Resolve <PaymentTestHelper>(); _playerCommands = _container.Resolve <PlayerCommands>(); _brandTestHelper = _container.Resolve <BrandTestHelper>(); _playerTestHelper = _container.Resolve <PlayerTestHelper>(); _autoVerificationConfigurationTestHelper = _container.Resolve <AutoVerificationConfigurationTestHelper>(); _riskProfileCheckTestHelper = _container.Resolve <RiskProfileCheckTestHelper>(); //create a not default VIP Level for Brand _vipLevel = _brandTestHelper.CreateNotDefaultVipLevel(DefaultBrandId); //create a player for the DefaultBrandId var player = _playerTestHelper.CreatePlayer(isActive: true, brandId: DefaultBrandId); var playerId = player.Id; _player = _container.Resolve <PlayerQueries>().GetPlayer(playerId); _playerUsername = _player.Username; _paymentTestHelper.CreatePlayerBankAccount(playerId, DefaultBrandId, true); //change the VIP Level for Player _playerCommands.ChangeVipLevel(playerId, _vipLevel.Id, "changed vip level"); //deposit _paymentTestHelper.MakeDeposit(_playerUsername, 100); _paymentTestHelper.MakeDeposit(_playerUsername, 200); _paymentTestHelper.MakeDeposit(_playerUsername, 300); //create Auto Verification configuration which expected to be failed _avcConfigurationBuilder = new AvcConfigurationBuilder(DefaultBrandId, new [] { _vipLevel.Id }, "CAD"); _avcConfigurationBuilder.SetupTotalDepositAmount(1500, ComparisonEnum.GreaterOrEqual); _avcDTO = _avcConfigurationBuilder.Configuration; _avc = _autoVerificationConfigurationTestHelper.CreateConfiguration(_avcDTO); _autoVerificationConfigurationTestHelper.Activate(_avc.Id); //create Risk Profile Check configuration _riskProfileCheckConfigurationBuilder = new RiskProfileCheckConfigurationBuilder(DefaultBrandId, _avcDTO.Licensee, "CAD", new List <Guid> { _vipLevel.Id }); _rpcDTO = _riskProfileCheckConfigurationBuilder.Configuration; var createdConfigurationEntity = _riskProfileCheckTestHelper.CreateConfiguration(_rpcDTO); _rpcDTO.Id = createdConfigurationEntity.Id; }
public void Can_export_report_data() { // Arrange PaymentTestHelper.CreateOfflineDeposit(_player.Id, TestDataGenerator.GetRandomDepositAmount()); var filteredRecords = ReportController.FilterAndOrder( _reportQueries.GetDepositRecordsForExport(), new DepositRecord(), "Submitted", "asc"); // Act var content = Encoding.Unicode.GetString(ReportController.ExportToExcel(filteredRecords)); // Assert Assert.AreNotEqual(content.IndexOf("<table"), -1); }
public void Can_process_confirm_deposit() { // Arrange var depositAmount = TestDataGenerator.GetRandomDepositAmount(); var deposit = PaymentTestHelper.CreateOfflineDeposit(_player.Id, depositAmount); // Act PaymentTestHelper.ConfirmOfflineDeposit(deposit); // Assert Assert.AreEqual(1, _reportRepository.DepositRecords.Count()); var record = _reportRepository.DepositRecords.Single(); Assert.AreEqual(deposit.Id, record.DepositId); Assert.AreEqual(depositAmount, record.Amount); Assert.AreEqual(OfflineDepositStatus.Processing.ToString(), record.Status); }
public override void BeforeAll() { base.BeforeAll(); //create a brand for a default licensee _brandTestHelper = _container.Resolve <BrandTestHelper>(); var defaultLicenseeId = _brandTestHelper.GetDefaultLicensee(); _currency = _brandTestHelper.CreateCurrency("ZAR", "South African Rand"); _brand = _brandTestHelper.CreateBrand(defaultLicenseeId, null, null, _currency); // create a bank account for the brand _paymentTestHelper = _container.Resolve <PaymentTestHelper>(); _bankAccount = _paymentTestHelper.CreateBankAccount(_brand.Id, _currency.Code); _brandQueries = _container.Resolve <BrandQueries>(); _brandCurrency = _brandQueries.GetCurrenciesByBrand(_brand.Id).Select(c => c.Code).First(); }
public void Can_process_verify_deposit() { // Arrange var depositAmount = TestDataGenerator.GetRandomDepositAmount(); var deposit = PaymentTestHelper.CreateOfflineDeposit(_player.Id, depositAmount); PaymentTestHelper.ConfirmOfflineDeposit(deposit); // Act PaymentTestHelper.VerifyOfflineDeposit(deposit, true); // Assert Assert.AreEqual(1, _reportRepository.DepositRecords.Count()); var record = _reportRepository.DepositRecords.Single(); Assert.AreEqual(deposit.Id, record.DepositId); Assert.Less(DateTimeOffset.Now.AddDays(-2), record.Verified); Assert.AreEqual(_actorInfoProvider.Actor.UserName, record.VerifiedBy); Assert.AreEqual(OfflineDepositStatus.Verified.ToString(), record.Status); }
public override void BeforeEach() { base.BeforeEach(); _playerQueries = Container.Resolve <PlayerQueries>(); _paymentRepository = Container.Resolve <FakePaymentRepository>(); _paymentTestHelper = Container.Resolve <PaymentTestHelper>(); _gamesTestHelper = Container.Resolve <GamesTestHelper>(); var securityTestHelper = Container.Resolve <SecurityTestHelper>(); securityTestHelper.PopulatePermissions(); securityTestHelper.CreateAndSignInSuperAdmin(); var brandHelper = Container.Resolve <BrandTestHelper>(); brandHelper.CreateActiveBrandWithProducts(); Container.Resolve <PlayerTestHelper>().CreatePlayer(); Container.Resolve <PaymentWorker>().Start(); }
public override void BeforeAll() { base.BeforeAll(); _paymentTestHelper = _container.Resolve <PaymentTestHelper>(); _playerTestHelper = _container.Resolve <PlayerTestHelper>(); var brandTestHelper = _container.Resolve <BrandTestHelper>(); var defaultLicenseeId = brandTestHelper.GetDefaultLicensee(); Core.Brand.Interface.Data.Currency curreny = new Core.Brand.Interface.Data.Currency { Code = DefaultCurrency, Name = DefaultCurrency }; //create a brand for a default licensee _brand = brandTestHelper.CreateBrand(defaultLicenseeId, null, null, curreny, true); //log in _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin(); _dashboardPage.BrandFilter.SelectAll(); }
public override void BeforeAll() { base.BeforeAll(); _paymentTestHelper = _container.Resolve <PaymentTestHelper>(); _playerCommands = _container.Resolve <PlayerCommands>(); _brandTestHelper = _container.Resolve <BrandTestHelper>(); _playerTestHelper = _container.Resolve <PlayerTestHelper>(); _autoVerificationConfigurationTestHelper = _container.Resolve <AutoVerificationConfigurationTestHelper>(); //create a not default VIP Level for Brand _vipLevel = _brandTestHelper.CreateNotDefaultVipLevel(DefaultBrandId); //create a player for the DefaultBrandId var player = _playerTestHelper.CreatePlayer(isActive: true, brandId: DefaultBrandId); var playerId = player.Id; _player = _container.Resolve <PlayerQueries>().GetPlayer(playerId); _playerUsername = _player.Username; _paymentTestHelper.CreatePlayerBankAccount(playerId, DefaultBrandId, true); //change the VIP Level for Player _playerCommands.ChangeVipLevel(playerId, _vipLevel.Id, "changed vip level"); //deposit _paymentTestHelper.MakeDeposit(_playerUsername, 100); _paymentTestHelper.MakeDeposit(_playerUsername, 200); _paymentTestHelper.MakeDeposit(_playerUsername, 300); _avcConfigurationBuilder = new AvcConfigurationBuilder(DefaultBrandId, new[] { _vipLevel.Id }, "CAD"); _avcDTO = _avcConfigurationBuilder.Configuration; _avc = _autoVerificationConfigurationTestHelper.CreateConfiguration(_avcDTO); _autoVerificationConfigurationTestHelper.Activate(_avc.Id); }
public override void BeforeAll() { base.BeforeAll(); _paymentTestHelper = _container.Resolve <PaymentTestHelper>(); _playerCommands = _container.Resolve <PlayerCommands>(); _playerTestHelper = _container.Resolve <PlayerTestHelper>(); _autoVerificationConfigurationTestHelper = _container.Resolve <AutoVerificationConfigurationTestHelper>(); var brand = _container.Resolve <BrandQueries>().GetBrand(DefaultBrandId); _vipLevel = brand.DefaultVipLevel; //create a not default VIP Level for Brand //create a player for the DefaultBrandId _player = _playerTestHelper.CreatePlayer(isActive: true, brandId: DefaultBrandId); var playerId = _player.Id; _playerUsername = _player.Username; _paymentTestHelper.CreatePlayerBankAccount(playerId, DefaultBrandId, true); //change the VIP Level for Player _playerCommands.ChangeVipLevel(playerId, _vipLevel.Id, "changed vip level"); //deposit _paymentTestHelper.MakeDeposit(_playerUsername, 200); //create Auto Verification configuration which expected to be failed _avcConfigurationBuilder = new AvcConfigurationBuilder(DefaultBrandId, new[] { _vipLevel.Id }, "CAD"); _avcConfigurationBuilder.SetupTotalDepositAmount(1500, ComparisonEnum.GreaterOrEqual); _avcDTO = _avcConfigurationBuilder.Configuration; _avc = _autoVerificationConfigurationTestHelper.CreateConfiguration(_avcDTO); _autoVerificationConfigurationTestHelper.Activate(_avc.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(); }
public override void BeforeEach() { base.BeforeEach(); _driver.Logout(); _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin(); _dashboardPage.BrandFilter.SelectAll(); _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem(); _brandTestHelper = _container.Resolve <BrandTestHelper>(); _paymentTestHelper = _container.Resolve <PaymentTestHelper>(); _playerQueries = _container.Resolve <PlayerQueries>(); _gamesTestHelper = _container.Resolve <GamesTestHelper>(); var avcTestHelper = _container.Resolve <AutoVerificationConfigurationTestHelper>(); var playerTestHelper = _container.Resolve <PlayerTestHelper>(); var brandQueries = _container.Resolve <BrandQueries>(); var playerCommands = _container.Resolve <PlayerCommands>(); //create a brand for a default licensee _brand = brandQueries.GetBrand(DefaultBrandId); //create a not default VIP Level for Brand var vipLevel = _brandTestHelper.CreateNotDefaultVipLevel(DefaultBrandId); //create Auto Verification Configuration for custom Brand var gameRepository = _container.Resolve <IGameRepository>(); var avcConfigurationBuilder = new AvcConfigurationBuilder(_brand.Id, new[] { vipLevel.Id }, "CAD"); avcConfigurationBuilder .SetupWinnings(new List <WinningRuleDTO> { new WinningRuleDTO { Id = Guid.NewGuid(), ProductId = gameRepository.GameProviders.Single(g => g.Name == "Mock Sport Bets").Id, Comparison = ComparisonEnum.Greater, Amount = 200, Period = PeriodEnum.FromSignUp } }); var configuration = avcConfigurationBuilder.Configuration; var createdConfiguration = avcTestHelper.CreateConfiguration(configuration); avcTestHelper.Activate(createdConfiguration.Id); // create a player with a bound bank account for a brand var player = playerTestHelper.CreatePlayer(true, _brand.Id); _playerUsername = player.Username; _playerFirstname = player.FirstName; _playerLastname = player.LastName; _playerFullname = _playerFirstname + " " + _playerLastname; _paymentTestHelper.CreatePlayerBankAccount(player.Id, DefaultBrandId, true); //change the VIP Level for Player playerCommands.ChangeVipLevel(player.Id, vipLevel.Id, "changed vip level"); //deposit some money _paymentTestHelper.MakeDeposit(_playerUsername, 400); Thread.Sleep(5000); //wait for Deposit created event processing }