Example #1
0
        public void TotalValue_WhenValidCreditCreated_ShouldBeAddedInterestValue()
        {
            _sut = new LegalCredit(15001, 5, DateTime.Now.AddDays(15).Date);

            _sut.TotalValue.ShouldBe(15751.05m);
        }
Example #2
0
        public void InterestValue_WhenValidCreditCreated_ShouldBePercentageOfValue()
        {
            _sut = new LegalCredit(15001, 5, DateTime.Now.AddDays(15).Date);

            _sut.InterestValue.ShouldBe(750.05m);
        }
Example #3
0
        public void Validate_WhenCreditCreated(decimal value, int qtdInstallments, DateTime firstDueDate, bool expectedStatus)
        {
            _sut = new LegalCredit(value, qtdInstallments, firstDueDate);

            _sut.IsApproved.ShouldBe(expectedStatus);
        }