public void HistoryTest() { var createDate = DateTime.UtcNow; var payment = 56.76m; var paycode = LibLogic.Helpers.SiteInfo.MonthlyPaymentId; var pay = new LibLogic.Payments.Payment(this.userid); for (int i = 0; i < 1000; i++) { pay.SaveUserPayment(payment, createDate.AddMonths(i), paycode); Assert.That(pay.History().Count(), Is.EqualTo(i + 1)); } }
public Account() { var profileInfo = new LibLogic.Accounts.UserInfo(Helpers.SessionVariables.Instance.UserId).GetProfile(); FirstName = profileInfo.FirstName; LastName = profileInfo.LastName; UsersEmail = profileInfo.Email; ChargeAmount = LibLogic.Helpers.SiteInfo.CurrentMonthlyRate.ToString("G29"); ChargeAmountStripCents = LibLogic.Helpers.SiteInfo.CurrentMonthlyRateInCents; var payInfo = new LibLogic.Payments.Payment(Helpers.SessionVariables.Instance.UserId); AccountExpired = payInfo.IsExpired(); PaymentHistory = payInfo.History(); }