예제 #1
0
        private DepositRecord GetDepositRecords(string transactionNumber, string status)
        {
            Func <DepositRecord> func = () =>
            {
                var depositReport = _reportQueries.GetDepositRecords().
                                    FirstOrDefault(x => x.TransactionId == transactionNumber &&
                                                   x.Status == status
                                                   );
                return(depositReport);
            };

            return(WaitFor(func, TimeSpan.FromSeconds(20)));
        }
예제 #2
0
        public void Cannot_execute_ReportQueries_without_permissions()
        {
            // Arrange
            LogWithNewAdmin(Modules.PlayerManager, Permissions.Update);

            // Act
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetAdminActivityLog());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetAdminAuthenticationLog());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetMemberAuthenticationLog());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetPlayerRecords());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetPlayerRecordsForExport());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetPlayerBetHistoryRecords());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetPlayerBetHistoryRecordsForExport());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetDepositRecords());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetDepositRecordsForExport());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetBrandRecords());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetBrandRecordsForExport());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetLicenseeRecords());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetLicenseeRecordsForExport());
            //Assert.Throws<InsufficientPermissionsException>(() => _reportQueries.GetLanguageRecords());
            //Assert.Throws<InsufficientPermissionsException>(() => _reportQueries.GetLanguageRecordsForExport());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetVipLevelRecords());
            Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetVipLevelRecordsForExport());
        }
예제 #3
0
        public JsonResult DepositData(SearchPackage searchPackage)
        {
            var dataBuilder = new SearchPackageDataBuilder <DepositRecord>(searchPackage, _queries.GetDepositRecords());
            var data        = dataBuilder
                              .Map(r => r.DepositId, r => new object[]
            {
                r.Licensee,
                r.Brand,
                r.Username,
                r.IsInternalAccount,
                r.VipLevel,
                r.TransactionId,
                r.DepositId,
                r.PaymentMethod,
                r.Currency,
                r.Amount,
                r.ActualAmount,
                r.Fee,
                r.Status,
                r.Submitted.GetNormalizedDateTime(true),
                r.SubmittedBy,
                r.Approved.GetNormalizedDateTime(true),
                r.ApprovedBy,
                r.Rejected.GetNormalizedDateTime(true),
                r.RejectedBy,
                r.Verified.GetNormalizedDateTime(true),
                r.VerifiedBy,
                r.DepositType,
                r.BankAccountName,
                r.BankAccountId,
                r.BankName,
                r.BankProvince,
                r.BankBranch,
                r.BankAccountNumber
            })
                              .GetPageData(r => r.Submitted);

            return(new JsonResult {
                Data = data, MaxJsonLength = int.MaxValue, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }