Ejemplo n.º 1
0
        public void GetRepaymentSchedule()
        {
            // Arrange
            LoanController controller = new LoanController(new Services.LoanService());

            // Act
            ScheduleDto result = controller.GetRepaymentSchedule(50000, 19);

            // Assert
            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Installments);
            Assert.AreEqual(52, result.Installments.Count());
            Assert.AreEqual(50000, result.Installments.ElementAt(0).AmountDue);
            Assert.AreEqual(875, result.Installments.ElementAt(0).Principal);
        }