public void CheckLoanFilling_AmountIsEmpty() { Loan loan = new Loan{Amount = 0}; LoanServices loanServices = new LoanServices(new User()); loanServices.CheckLoanFilling(loan); }
public void CheckLoanFilling_AnticipatedRepaymentPenaltiesIsEmpty() { Loan loan = new Loan { Amount = 11, InterestRate = 1, NbOfInstallments = 3, InstallmentType = new InstallmentType(), AnticipatedTotalRepaymentPenalties = -1 }; LoanServices loanServices = new LoanServices(new User()); loanServices.CheckLoanFilling(loan); }
public void CheckLoanFilling_NonRepaymentPenalties_OverDuePrincipalIsEmpty() { Loan loan = new Loan { Amount = 11, InterestRate = 1, NbOfInstallments = 3, InstallmentType = new InstallmentType(), AnticipatedTotalRepaymentPenalties = 2, NonRepaymentPenalties = new NonRepaymentPenalties(1, 1, 1, -1) }; LoanServices loanServices = new LoanServices(new User()); loanServices.CheckLoanFilling(loan); }
public void CheckLoanFilling_NonRepaymentPenalties_EntryFeesIsEmpty() { Loan loan = new Loan { Amount = 11, InterestRate = 1, NbOfInstallments = 3, InstallmentType = new InstallmentType(), AnticipatedTotalRepaymentPenalties = 2, NonRepaymentPenalties = new NonRepaymentPenalties(1, 1, 1, 1), LoanEntryFeesList = null }; LoanServices loanServices = new LoanServices(new User()); loanServices.CheckLoanFilling(loan); }
public void CheckLoanFilling_NbOfInstallmentsIsEmpty() { Loan loan = new Loan { Amount = 11, InterestRate = 1, NbOfInstallments = 0}; LoanServices loanServices = new LoanServices(new User()); loanServices.CheckLoanFilling(loan); }
public void CheckLoanFilling_InterestRateIsEmpty() { Loan loan = new Loan { Amount = 10, InterestRate = -1}; LoanServices loanServices = new LoanServices(new User()); loanServices.CheckLoanFilling(loan); }
public void CheckLoanFilling_EverythingIsOk() { Currency currency = new Currency {Name = "USD", Code = "USD"}; LoanProduct loanProduct = new LoanProduct { Currency = currency, Name = "test" }; FundingLine fundingLine = new FundingLine { Currency = currency }; Loan loan = new Loan { Amount = 11, Product = loanProduct, InterestRate = 1, NbOfInstallments = 3, InstallmentType = new InstallmentType(), AnticipatedTotalRepaymentPenalties = 2, NonRepaymentPenalties = new NonRepaymentPenalties(1, 1, 1, 1), LoanEntryFeesList = new List<LoanEntryFee>(), LoanOfficer = User.CurrentUser, FundingLine = fundingLine, GracePeriod = 2, EconomicActivityId = 1, }; LoanServices loanServices = new LoanServices(new User()); loanServices.CheckLoanFilling(loan); Assert.AreEqual(1,1); }