Exemple #1
0
        public void Mortgage_Get_Calc()
        {
            _mockRepository.Setup(x => x.GetAll()).Returns(_listMortgages);
            List <LoanViewModel> results = _service.LoanCalculation(200000, 13.5, 10, "Variable") as List <LoanViewModel>;

            Assert.IsNotNull(results);
            Assert.AreEqual(2, results.Count);
        }
Exemple #2
0
 public List <LoanViewModel> Calculation(CalculationViewModel loan)
 {
     if (loan == null)
     {
         return(null);
     }
     return(_mortgageService.LoanCalculation(loan.LoanAmount, loan.InterestRate, loan.Years, loan.LoanType));
 }