public WhenGettingMatchedLearnerFixture WithRepositoryReturningResult() { _result = _fixture.Create <MatchedLearnerDto>(); _mockService .Setup(x => x.GetMatchedLearner(_ukprn, _uln)) .ReturnsAsync(_result); return(this); }
public WhenGettingMatchedLearnerFixture WithRepositoryReturningNull() { _result = null; _mockService .Setup(x => x.GetMatchedLearner(_ukprn, _uln)) .ReturnsAsync(_result); return(this); }
public void Setup() { var testInput = new MatchedLearnerDataLockInfo { //TODO: Fix this //LatestSuccessfulJobs = new List<LatestSuccessfulJobModel> //{ // new LatestSuccessfulJobModel // { // CollectionPeriod = _expectedIlrSubmissionWindowPeriod, // AcademicYear = _expectedAcademicYear, // IlrSubmissionTime = _expectedIlrSubmissionDate, // Ukprn = _expectedUkprn, // JobId = 1, // DcJobId = 1, // } //}, DataLockEvents = new List <DataLockEventModel> { new DataLockEventModel { LearningStartDate = _expectedLearningStartDate, EventTime = _expectedEventTime, IlrSubmissionDateTime = _expectedIlrSubmissionDate, CollectionPeriod = _expectedIlrSubmissionWindowPeriod, AcademicYear = _expectedAcademicYear, Ukprn = _expectedUkprn, LearnerUln = _expectedUln, LearningAimReference = _expectedTrainingReference, LearningAimProgrammeType = _expectedTrainingProgrammeType, LearningAimStandardCode = _expectedTrainingStandardCode, LearningAimFrameworkCode = _expectedTrainingFrameworkCode, LearningAimPathwayCode = _expectedTrainingPathwayCode, LearningAimFundingLineType = _expectedTrainingFundingLineType, } }, DataLockEventPriceEpisodes = new List <DataLockEventPriceEpisodeModel> { new DataLockEventPriceEpisodeModel { StartDate = _expectedPriceEpisodeStartDate, ActualEndDate = _expectedPriceEpisodeEndDate, TotalNegotiatedPrice1 = 100m, TotalNegotiatedPrice2 = 200m, InstalmentAmount = _expectedPriceEpisodeInstalmentAmount, NumberOfInstalments = _expectedPriceEpisodeNumberOfInstalments, CompletionAmount = _expectedPriceEpisodeCompletionAmount, PriceEpisodeIdentifier = _expectedPriceEpisodeIdentifier, EffectiveTotalNegotiatedPriceStartDate = _expectedTotalNegotiatedPriceStartDate } }, DataLockEventNonPayablePeriods = new List <DataLockEventNonPayablePeriodModel> { new DataLockEventNonPayablePeriodModel { PriceEpisodeIdentifier = _expectedPriceEpisodeIdentifier, DeliveryPeriod = 2, } }, DataLockEventNonPayablePeriodFailures = new List <DataLockEventNonPayablePeriodFailureModel> { new DataLockEventNonPayablePeriodFailureModel { ApprenticeshipId = 123, DataLockFailureId = 2, }, new DataLockEventNonPayablePeriodFailureModel { ApprenticeshipId = 123, DataLockFailureId = 3, }, }, Apprenticeships = new List <ApprenticeshipModel> { new ApprenticeshipModel { Id = 123, ApprenticeshipEmployerType = _expectedApprenticeshipEmployerType }, new ApprenticeshipModel { Id = 456, ApprenticeshipEmployerType = _expectedApprenticeshipEmployerType } }, DataLockEventPayablePeriods = new List <DataLockEventPayablePeriodModel> { new DataLockEventPayablePeriodModel { PriceEpisodeIdentifier = _expectedPriceEpisodeIdentifier, ApprenticeshipId = 456, DeliveryPeriod = 1, }, } }; var sut = new MatchedLearnerDtoMapper(); _actual = sut.Map(testInput); }
public void Setup() { _testInput.Clear(); _testInput.Add(new DatalockEvent { LearningStartDate = _expectedLearningStartDate, EventTime = _expectedEventTime, IlrSubmissionDateTime = _expectedIlrSubmissionDate, CollectionPeriod = _expectedIlrSubmissionWindowPeriod, AcademicYear = _expectedAcademicYear, Ukprn = _expectedUkprn, LearnerUln = _expectedUln, LearningAimReference = _expectedTrainingReference, LearningAimProgrammeType = _expectedTrainingProgrammeType, LearningAimStandardCode = _expectedTrainingStandardCode, LearningAimFrameworkCode = _expectedTrainingFrameworkCode, LearningAimPathwayCode = _expectedTrainingPathwayCode, LearningAimFundingLineType = _expectedTrainingFundingLineType, PriceEpisodes = new List <DatalockEventPriceEpisode> { new DatalockEventPriceEpisode { StartDate = _expectedPriceEpisodeStartDate, ActualEndDate = _expectedPriceEpisodeEndDate, TotalNegotiatedPrice1 = 100m, TotalNegotiatedPrice2 = 200m, InstalmentAmount = _expectedPriceEpisodeInstalmentAmount, NumberOfInstalments = _expectedPriceEpisodeNumberOfInstalments, CompletionAmount = _expectedPriceEpisodeCompletionAmount, PriceEpisodeIdentifier = _expectedPriceEpisodeIdentifier, } }, NonPayablePeriods = new List <DatalockEventNonPayablePeriod> { new DatalockEventNonPayablePeriod { PriceEpisodeIdentifier = _expectedPriceEpisodeIdentifier, DeliveryPeriod = 2, Failures = new List <DatalockEventNonPayablePeriodFailure> { new DatalockEventNonPayablePeriodFailure { Apprenticeship = new Apprenticeship { Id = 123, ApprenticeshipEmployerType = _expectedApprenticeshipEmployerType, }, DataLockFailureId = 2, }, new DatalockEventNonPayablePeriodFailure { Apprenticeship = new Apprenticeship { Id = 123, ApprenticeshipEmployerType = _expectedApprenticeshipEmployerType, }, DataLockFailureId = 3, }, } }, }, PayablePeriods = new List <DatalockEventPayablePeriod> { new DatalockEventPayablePeriod { PriceEpisodeIdentifier = _expectedPriceEpisodeIdentifier, Apprenticeship = new Apprenticeship { ApprenticeshipEmployerType = _expectedApprenticeshipEmployerType, }, DeliveryPeriod = 1, }, } }); var sut = new MatchedLearnerDtoMapper(); _actual = sut.Map(_testInput); }