public void GetTotalDebtAmount(double debtAmount, double increasePercentage, int totalYears, double[] actrualDebtAmount, double[] actrualIncreaseAmount, double[] actrualIncreasePercentage, double[] actrualTotalDebtAmount) { var svc = new LoanController(); var result = svc.GetTotalDebtAmount(debtAmount, increasePercentage, totalYears).Value.ToList(); for (int i = 0; i < totalYears; i++) { Assert.Equal(result[i].DebtAmount, actrualDebtAmount[i]); Assert.Equal(result[i].IncreaseAmount, actrualIncreaseAmount[i]); Assert.Equal(result[i].IncreasePercentage, actrualIncreasePercentage[i]); Assert.Equal(result[i].TotalDebtAmount, actrualTotalDebtAmount[i]); } ; }