public void Then_is_true_when_the_payment_year_changes() { // arrange _newPendingPaymentModel.CollectionPeriod = new CollectionPeriod(_sut.CollectionPeriod.PeriodNumber, (short)(_sut.CollectionPeriod.AcademicYear + 1)); _newPendingPayment = PendingPayment.Get(_newPendingPaymentModel); // act var result = _sut.RequiresNewPayment(_newPendingPayment); // assert result.Should().BeTrue(); }
public void Then_is_true_when_the_amount_change() { // arrange _newPendingPaymentModel.Amount = _sut.Amount + 1; _newPendingPayment = PendingPayment.Get(_newPendingPaymentModel); // act var result = _sut.RequiresNewPayment(_newPendingPayment); // assert result.Should().BeTrue(); }
public void Arrange() { _fixture = new Fixture(); _sutModel = _fixture .Build <PendingPaymentModel>() .With(p => p.DueDate, DateTime.Today) .With(p => p.CollectionPeriod, new CollectionPeriod(1, 2021)) .With(p => p.EarningType, EarningType.FirstPayment) .Create(); _newPendingPaymentModel = _fixture .Build <PendingPaymentModel>() .With(p => p.Account, _sutModel.Account) .With(p => p.ApprenticeshipIncentiveId, _sutModel.ApprenticeshipIncentiveId) .With(p => p.Amount, _sutModel.Amount) .With(p => p.CollectionPeriod, new CollectionPeriod(_sutModel.CollectionPeriod.PeriodNumber, _sutModel.CollectionPeriod.AcademicYear)) .Create(); _newPendingPayment = PendingPayment.Get(_newPendingPaymentModel); _sut = PendingPayment.Get(_sutModel); }
public static PendingPayment Map(this PendingPaymentModel model) { return(PendingPayment.Get(model)); }