public void WhenMonthlyPaymentProcessRunsForTheFollowingIlrData(Table table) { // Setup reference data var environmentVariables = EnvironmentVariablesFactory.GetEnvironmentVariables(); SetupContexLearners(table); var provider = StepDefinitionsContext.GetDefaultProvider(); provider.Ukprn = long.Parse(table.Rows[0]["UKPRN"]); var learner = provider.Learners[0]; var startDate = StepDefinitionsContext.GetIlrStartDate().NextCensusDate(); SetupValidLearnersData(provider.Ukprn, learner); var dueAmount = learner.LearningDelivery.PriceEpisodes[0].TotalPrice * 0.8m / 12; EarningsDataHelper.SavePeriodisedValuesForUkprn(provider.Ukprn, learner.LearnRefNumber, new Dictionary <int, decimal> { { 1, dueAmount } }, learner.LearningDelivery.PriceEpisodes[0].Id, environmentVariables); //Run the month end RunMonthEnd(startDate); }
private void ProcessIlrFileSubmissions(Table table, DateTime?firstSubmissionDate = null) { SetupContextProviders(table); SetupContexLearners(table); AddScenarioReferenceData(); var startDate = firstSubmissionDate ?? StepDefinitionsContext.GetIlrStartDate().NextCensusDate(); if (firstSubmissionDate != null) { ScenarioContext.Current.Add("firstSubmissionDate", firstSubmissionDate); } ProcessMonths(startDate); }
public void WhenAndIlrIsSubmittedWithTheFollowingData(Table table) { SetupContexLearners(table); var provider = StepDefinitionsContext.GetDefaultProvider(); var startDate = StepDefinitionsContext.GetIlrStartDate().NextCensusDate(); //Update the UKPRN to the one from ILR as this is the one which will be in the validation error table provider.Ukprn = long.Parse(table.Rows[0]["UKPRN"]); SubmitIlr(provider, startDate.GetAcademicYear(), startDate.NextCensusDate(), new ProcessService(new TestLogger())); }
public void ThenTheDataLockStatusWillBeAsFollows(Table table) { var date = StepDefinitionsContext.GetIlrStartDate().NextCensusDate(); var endDate = StepDefinitionsContext.GetIlrEndDate(); while (date <= endDate) { var period = date.GetPeriod(); foreach (var provider in StepDefinitionsContext.Providers) { VerifyProviderDataLockMatchesForPeriod(period, table, provider); } date = date.AddDays(15).NextCensusDate(); } }