public ActionResult VerifiedList(SearchPackage searchPackage) { var data = SearchOfflineWithdraws( searchPackage, obj => new[] { obj.PlayerBankAccount.Player.Username, obj.PlayerBankAccount.Bank.Brand.Name, obj.PlayerBankAccount.Bank.BankName, obj.TransactionNumber, obj.PlayerBankAccount.Province, obj.PlayerBankAccount.City, obj.PlayerBankAccount.Branch, obj.PlayerBankAccount.SwiftCode, obj.PlayerBankAccount.Address, obj.PlayerBankAccount.AccountName, obj.PlayerBankAccount.AccountNumber, obj.Amount.ToString(CultureInfo.InvariantCulture), obj.Created.ToString(CultureInfo.InvariantCulture), obj.CreatedBy, obj.Remarks }, _service.GetWithdrawalsForAcceptance()); return(new JsonResult { Data = data, MaxJsonLength = int.MaxValue, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public void Cannot_execute_WithdrawalService_without_permissions() { // Arrange LogWithNewAdmin(Modules.OfflineDepositRequests, Permissions.View); // Act Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.GetWithdrawalsForVerification()); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.GetWithdrawalsForAcceptance()); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.GetWithdrawalsForApproval()); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.GetWithdrawalsCanceled()); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.GetWithdrawalsFailedAutoWagerCheck()); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.GetWithdrawalsOnHold()); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.Request(new OfflineWithdrawRequest())); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.Verify(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.Unverify(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.Approve(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.Reject(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.PassWager(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.FailWager(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.PassInvestigation(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.FailInvestigation(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.Accept(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.Revert(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.Cancel(new Guid(), "Some remark")); Assert.Throws <InsufficientPermissionsException>(() => _withdrawalService.SaveExemption(new Exemption())); }
private void CancelOfflineWithdrawalRequest(WithdrawalStatus stateToGetInto) { _paymentTestHelper.MakeDeposit(_player.Id, 2000); Balance.Main = 2000; var response = _paymentTestHelper.MakeWithdraw(_player.Id, amount: 100); _withdrawalService.Revert(response.Id, "Revert to Verification Queue"); /* */ //Cancel withdrawal request if (stateToGetInto == WithdrawalStatus.Canceled) { _withdrawalService.Cancel(response.Id, "Cancel Withdrawal Request"); } else if (stateToGetInto == WithdrawalStatus.Unverified) { _withdrawalService.Unverify(response.Id, "Unverify Withdrawal Request"); } //Assert there's nothing in the "On Hold Queue" var withdrawalsInTheOnHoldQueue = _withdrawalService.GetWithdrawalsOnHold(); Assert.IsEmpty(withdrawalsInTheOnHoldQueue); //Assert there's nothing in the "Release Queue" var withdrawalsInTheReleaseQueue = _withdrawalService.GetWithdrawalsForApproval(); Assert.IsEmpty(withdrawalsInTheReleaseQueue); //Assert there's nothing in the "Acceptance Queue" var withdrawalsInTheAccQueue = _withdrawalService.GetWithdrawalsForAcceptance(); Assert.IsEmpty(withdrawalsInTheAccQueue); //Assert there's nothing in the "Verification Queue" var withdrawalsInTheVerificationQueue = _withdrawalService.GetWithdrawalsForVerificationQueue(); Assert.IsEmpty(withdrawalsInTheVerificationQueue); }