public void IsTheExoticProductNameAlreadyExist_DontExist() { LoanProductManager loanProductManager = (LoanProductManager)container["LoanProductManager"]; bool exist = loanProductManager.IsThisExoticProductNameAlreadyExist("SSSZE"); Assert.IsFalse(exist); }
public void IsTheExoticProductNameAlreadyExist_ReallyExist() { LoanProductManager loanProductManager = (LoanProductManager)container["LoanProductManager"]; bool exist = loanProductManager.IsThisExoticProductNameAlreadyExist("Exotic"); Assert.IsTrue(exist); }
public int AddExoticProduct(ExoticInstallmentsTable pExoticProduct, OLoanTypes loanType) { if (_productManager.IsThisExoticProductNameAlreadyExist(pExoticProduct.Name)) { throw new OpenCbsPackageSaveException(OpenCbsPackageSaveExceptionEnum.ExoticProductNameAlreadyExist); } if (!pExoticProduct.CheckIfSumIsOk(loanType)) { throw new OpenCbsPackageSaveException(OpenCbsPackageSaveExceptionEnum.ExoticProductSumInIncorrect); } pExoticProduct.Id = _productManager.AddExoticInstallmentsTable(pExoticProduct); foreach (ExoticInstallment installment in pExoticProduct) { _productManager.AddExoticInstallment(installment, pExoticProduct); } return(pExoticProduct.Id); }