public void SelectAllProducts_OnlyForCorporate_DontShowDeleted() { LoanProductManager loanProductManager = (LoanProductManager)container["LoanProductManager"]; List <LoanProduct> list = loanProductManager.SelectAllPackages(false, OClientTypes.Corporate); Assert.AreEqual(1, list.Count); }
public void SelectAllProducts_All_ShowDeleted() { LoanProductManager loanProductManager = (LoanProductManager)container["LoanProductManager"]; List <LoanProduct> list = loanProductManager.SelectAllPackages(true, OClientTypes.All); Assert.AreEqual(4, list.Count); }
public void SelectAllProducts_OnlyForPerson_DontShowDeleted() { LoanProductManager loanProductManager = (LoanProductManager)container["LoanProductManager"]; List <LoanProduct> list = loanProductManager.SelectAllPackages(false, OClientTypes.Person); EntryFee entryFee = new EntryFee(); entryFee.Value = 3; list[0].EntryFees = new List <EntryFee>(); list[0].EntryFees.Add(entryFee); Assert.AreEqual(1, list.Count); AssertLoanProduct(_productWithValues, list[0], false); _productWithValues.ClientType = '-'; _productWithValues.Id = 4; _productWithValues.Name = "Product4"; }
public List <LoanProduct> FindAllPackages(bool selectDeleted, OClientTypes pClientType) { List <LoanProduct> retval = _productManager.SelectAllPackages(selectDeleted, pClientType); foreach (LoanProduct product in retval) { if (null == product.FundingLine) { continue; } product.FundingLine.Currency = new CurrencyServices(_user).GetCurrency(product.FundingLine.Currency.Id); if (product.UseEntryFeesCycles) { product.EntryFeeCycles = _productManager.SelectEntryFeeCycles(product.Id, false); product.EntryFees = _productManager.SelectEntryFeesWithCycles(product.Id, false); } else { product.EntryFees = _productManager.SelectEntryFeesWithoutCycles(product.Id, false); } } return(retval); }