Пример #1
0
        public async Task LearnerReEmployed()
        {
            ImportR04Fm36();
            TestSession.FM36Global.UKPRN = TestSession.Provider.Ukprn;
            TestSession.FM36Global.Learners.ForEach(x => x.ULN            = TestSession.Learner.Uln);
            TestSession.FM36Global.Learners.ForEach(x => x.LearnRefNumber = TestSession.Learner.LearnRefNumber);

            var dcHelper = Scope.Resolve <IDcHelper>();
            await dcHelper.SendIlrSubmission(TestSession.FM36Global.Learners,
                                             TestSession.Provider.Ukprn,
                                             TestSession.CollectionPeriod.AcademicYear,
                                             TestSession.CollectionPeriod.Period,
                                             TestSession.Provider.JobId);

            await WaitForRequiredPayments(2);

            await EmployerMonthEndHelper.SendLevyMonthEndForEmployers(
                TestSession.GenerateId(),
                TestSession.Employers.Select(x => x.AccountId),
                TestSession.CollectionPeriod.AcademicYear,
                TestSession.CollectionPeriod.Period,
                MessageSession);

            await WaitForPayments(2);
        }
        public async Task AfterPeriodEndRunPaymentsAreGenerated(Table table)
        {
            await EmployerMonthEndHelper.SendLevyMonthEndForEmployers(
                TestSession.GenerateId(),
                TestSession.Employers.Select(x => x.AccountId),
                TestSession.CollectionPeriod.AcademicYear,
                TestSession.CollectionPeriod.Period,
                MessageSession);

            var expectedPayments = table.CreateSet <ProviderPayment>().ToList();

            expectedPayments.ForEach(ep => ep.Uln = learnerB.Uln);

            await WaitForIt(() => AssertExpectedPayments(expectedPayments), "Failed to wait for expected number of payments");
        }
Пример #3
0
        public async Task WhenASubmissionIsProcessedForthelevyLearner()
        {
            var dcHelper = Scope.Resolve <IDcHelper>();
            await dcHelper.SendIlrSubmission(TestSession.FM36Global.Learners,
                                             TestSession.Provider.Ukprn,
                                             TestSession.CollectionPeriod.AcademicYear,
                                             TestSession.CollectionPeriod.Period,
                                             TestSession.Provider.JobId);

            await WaitForRequiredPayments(6);

            await EmployerMonthEndHelper.SendLevyMonthEndForEmployers(
                TestSession.GenerateId(),
                TestSession.Employers.Select(x => x.AccountId),
                TestSession.CollectionPeriod.AcademicYear,
                TestSession.CollectionPeriod.Period,
                MessageSession);
        }
Пример #4
0
        public async Task LearnerMadeRedundant()
        {
            ImportR03Fm36();

            TestSession.FM36Global.UKPRN = TestSession.Provider.Ukprn;
            TestSession.FM36Global.Learners.ForEach(x => x.ULN            = TestSession.Learner.Uln);
            TestSession.FM36Global.Learners.ForEach(x => x.LearnRefNumber = TestSession.Learner.LearnRefNumber);

            TestSession.Employers.Clear();
            TestSession.Employers.Add(new Employer {
                AccountId = TestSession.GenerateId(), Balance = 999999999, IsLevyPayer = true, AccountName = "employer 0"
            });
            TestSession.Employers.Add(new Employer {
                AccountId = TestSession.GenerateId(), Balance = 999999999, IsLevyPayer = true, AccountName = "employer 1"
            });

            foreach (var employer in TestSession.Employers)
            {
                await SaveLevyAccount(employer).ConfigureAwait(false);
            }

            ScriptInApprenticeshipsAndPriceEpisodes(); //This creates apprenticeships and apprenticeship prices episodes to match the apprenticeships in the FM36s and the scenario in the ticket

            var dcHelper = Scope.Resolve <IDcHelper>();
            await dcHelper.SendIlrSubmission(TestSession.FM36Global.Learners,
                                             TestSession.Provider.Ukprn,
                                             TestSession.CollectionPeriod.AcademicYear,
                                             TestSession.CollectionPeriod.Period,
                                             TestSession.Provider.JobId);

            await WaitForRequiredPayments(6);

            await EmployerMonthEndHelper.SendLevyMonthEndForEmployers(
                TestSession.GenerateId(),
                TestSession.Employers.Select(x => x.AccountId),
                TestSession.CollectionPeriod.AcademicYear,
                TestSession.CollectionPeriod.Period,
                MessageSession);

            await WaitForPayments(6);
        }
        public async Task LevyLearnerMadeRedundant()
        {
            ImportR07Fm36ForNonRedundantLevyLearner();

            await SetUpMatchingCommitment();

            var dcHelper = Scope.Resolve <IDcHelper>();
            await dcHelper.SendIlrSubmission(TestSession.FM36Global.Learners,
                                             TestSession.Provider.Ukprn,
                                             TestSession.CollectionPeriod.AcademicYear,
                                             TestSession.CollectionPeriod.Period,
                                             TestSession.Provider.JobId);

            await WaitForRequiredPayments(14);

            await EmployerMonthEndHelper.SendLevyMonthEndForEmployers(
                TestSession.GenerateId(),
                TestSession.Employers.Select(x => x.AccountId),
                TestSession.CollectionPeriod.AcademicYear,
                TestSession.CollectionPeriod.Period,
                MessageSession);

            await WaitForPayments(14);
        }
        public async Task ThereAreLessThan6MonthsRemainingOfPlannedLearning()
        {
            ImportR07Fm36ToMakeLearnerRedundant();

            await SetUpMatchingCommitment();

            CreateDataLockForCommitment(CommitmentIdentifier);

            TestSession.RegenerateJobId();

            var dcHelper = Scope.Resolve <IDcHelper>();
            await dcHelper.SendIlrSubmission(TestSession.FM36Global.Learners,
                                             TestSession.Provider.Ukprn,
                                             TestSession.CollectionPeriod.AcademicYear,
                                             TestSession.CollectionPeriod.Period,
                                             TestSession.Provider.JobId);

            await EmployerMonthEndHelper.SendLevyMonthEndForEmployers(
                TestSession.GenerateId(),
                TestSession.Employers.Select(x => x.AccountId),
                TestSession.CollectionPeriod.AcademicYear,
                TestSession.CollectionPeriod.Period,
                MessageSession);
        }