public void Arrange()
        {
            _fixture              = new Fixture();
            _accountId            = _fixture.Create <long>();
            _accountLegalEntityId = _fixture.Create <long>();
            var startDate       = DateTime.Now.Date;
            var collectionYear  = _fixture.Create <short>();
            var collectionMonth = _fixture.Create <byte>();

            _collectionPeriod = new CollectionPeriod(1, collectionYear);

            var legalEntityModels = new List <LegalEntityModel>
            {
                new LegalEntityModel {
                    Id = _accountId, AccountLegalEntityId = _accountLegalEntityId
                }
            };

            _accountModel = new AccountModel {
                Id = _accountId, LegalEntityModels = legalEntityModels
            };
            _account = Account.Create(_accountModel);

            _sutModel = new ApprenticeshipIncentiveModel
            {
                Account              = new ApprenticeshipIncentives.ValueTypes.Account(_accountId, _accountLegalEntityId),
                StartDate            = startDate,
                PendingPaymentModels = new List <PendingPaymentModel>
                {
                    new PendingPaymentModel
                    {
                        Account = new ApprenticeshipIncentives.ValueTypes.Account(_accountId, _accountLegalEntityId),
                        DueDate = startDate.AddDays(90),
                        PendingPaymentValidationResultModels = new List <PendingPaymentValidationResultModel>
                        {
                            new PendingPaymentValidationResultModel {
                                CollectionPeriod = new CollectionPeriod(1, collectionYear), Result = false, Step = ValidationStep.HasBankDetails
                            },
                            new PendingPaymentValidationResultModel {
                                CollectionPeriod = new CollectionPeriod(2, collectionYear), Result = false, Step = ValidationStep.HasBankDetails
                            }
                        }
                    }
                }
            };

            _sut = ApprenticeshipIncentive.Get(_sutModel.Id, _sutModel);
        }
Beispiel #2
0
 private ApprenticeshipIncentive Sut(ApprenticeshipIncentiveModel model)
 {
     return(ApprenticeshipIncentive.Get(model.Id, model));
 }
Beispiel #3
0
 public ApprenticeshipIncentive Build()
 {
     return(ApprenticeshipIncentive.Get(_apprenticeshipIncentiveModel.Id, _apprenticeshipIncentiveModel));
 }
Beispiel #4
0
 public ApprenticeshipIncentive GetExisting(Guid id, ApprenticeshipIncentiveModel model)
 {
     return(ApprenticeshipIncentive.Get(id, model));
 }