Example #1
0
        public GetCohortsHandlerTestFixtures AddUnapprovedCohortForEmployerWithMessagesAnd2Apprentices(long accountId)
        {
            var cohort = _autoFixture.Build <Cohort>()
                         .With(o => o.EmployerAccountId, accountId)
                         .With(o => o.EditStatus, EditStatus.Neither)
                         .With(o => o.IsDeleted, false)
                         .With(o => o.AccountLegalEntity, AccountLegalEntity)
                         .With(o => o.Provider, Provider)
                         .Without(o => o.Apprenticeships)
                         .Without(o => o.TransferRequests)
                         .Without(o => o.TransferSender)
                         .Without(o => o.Messages)
                         .Create();

            cohort.Apprenticeships.Add(new DraftApprenticeship());
            cohort.Apprenticeships.Add(new DraftApprenticeship());

            cohort.Messages.Add(new Message(cohort, Party.Employer, "XXX", "NotLast"));
            cohort.Messages.Add(new Message(cohort, Party.Provider, "XXX", "NotLast"));

            cohort.Messages.Add(new Message(cohort, Party.Employer, "XXX", "EmployerLast"));
            cohort.Messages.Add(new Message(cohort, Party.Provider, "XXX", "ProviderLast"));

            SeedCohorts.Add(cohort);
            return(this);
        }
Example #2
0
        public GetCohortsHandlerTestFixtures AddEmptyDraftCohortWithEmployer(long?accountId)
        {
            var cohort = _autoFixture.Build <Cohort>().With(o => o.EmployerAccountId, accountId)
                         .With(o => o.EditStatus, EditStatus.Neither)
                         .With(o => o.IsDeleted, false)
                         .With(o => o.AccountLegalEntity, AccountLegalEntity)
                         .With(o => o.Provider, Provider)
                         .Without(o => o.Apprenticeships)
                         .Without(o => o.TransferSender)
                         .Without(o => o.TransferRequests)
                         .Without(o => o.Messages)
                         .Create();

            SeedCohorts.Add(cohort);
            return(this);
        }
Example #3
0
        public GetCohortsHandlerTestFixtures AddTransferCohortForEmployerAndApprovedByAll(long accountId)
        {
            var cohort = _autoFixture.Build <Cohort>()
                         .With(o => o.EmployerAccountId, accountId)
                         .With(o => o.EditStatus, EditStatus.Both)
                         .With(o => o.TransferApprovalStatus, TransferApprovalStatus.Approved)
                         .With(o => o.IsDeleted, false)
                         .With(o => o.AccountLegalEntity, AccountLegalEntity)
                         .With(o => o.Provider, Provider)
                         .With(o => o.TransferSender, TransferSender)
                         .Without(o => o.Apprenticeships)
                         .Without(o => o.TransferRequests)
                         .Without(o => o.Messages)
                         .Create();

            SeedCohorts.Add(cohort);
            return(this);
        }