From b1b6d9daeb6df691e65c5ebe2e2f7964e27126e7 Mon Sep 17 00:00:00 2001 From: indiwiz Date: Tue, 5 Nov 2019 13:19:08 +0000 Subject: [PATCH] CON-997 Renamed properties per PR comments. --- .../Mappings/VacancyDisplayViewModelMapper.cs | 4 ++-- .../Orchestrators/Part1/DatesOrchestrator.cs | 2 +- .../Orchestrators/Part1/TrainingOrchestrator.cs | 4 ++-- .../Orchestrators/VacancyPreviewOrchestrator.cs | 4 ++-- .../Orchestrators/VacancyViewOrchestrator.cs | 10 +++++----- .../Part1/Training/ConfirmTrainingViewModel.cs | 2 +- .../VacancyPreview/VacancyPreviewViewModel.cs | 2 +- .../Mappings/VacancyDisplayViewModelMapper.cs | 4 ++-- .../Orchestrators/Part1/DatesOrchestrator.cs | 2 +- .../Orchestrators/Part1/TrainingOrchestrator.cs | 4 ++-- .../Orchestrators/VacancyPreviewOrchestrator.cs | 2 +- .../Part1/Training/ConfirmTrainingViewModel.cs | 2 +- .../VacancyPreview/VacancyPreviewViewModel.cs | 2 +- src/QA/QA.Web/Mappings/ReviewMapper.cs | 6 +++--- .../ApprenticeshipProgrammeMapperExtensions.cs | 2 +- .../Domain/Entities/ApprenticeshipLevelHelper.cs | 2 -- .../Domain/Entities/IApprenticeshipProgramme.cs | 2 +- .../Infrastructure/Extensions/VacancyExtensions.cs | 2 +- .../ApprenticeshipApiCollectionExtensions.cs | 4 ++-- .../ApprenticeshipProgramme.cs | 2 +- .../ApprenticeshipProgrammeEqualityComparer.cs | 2 +- .../Projections/EmployerDashboardProjectionService.cs | 2 +- .../Projections/ProviderDashboardProjectionService.cs | 2 +- .../CrossField/TestApprenticeshipProgramme.cs | 2 +- .../Extensions/VacancyExtensionsTests.cs | 4 ++-- .../ApprenticeshipProgrammesUpdaterServiceTests.cs | 4 ++-- 26 files changed, 39 insertions(+), 41 deletions(-) diff --git a/src/Employer/Employer.Web/Mappings/VacancyDisplayViewModelMapper.cs b/src/Employer/Employer.Web/Mappings/VacancyDisplayViewModelMapper.cs index 9f3a51f7fb..fc26a964d9 100644 --- a/src/Employer/Employer.Web/Mappings/VacancyDisplayViewModelMapper.cs +++ b/src/Employer/Employer.Web/Mappings/VacancyDisplayViewModelMapper.cs @@ -45,7 +45,7 @@ public async Task MapFromVacancyAsync(DisplayVacancyViewModel vm, Vacancy vacanc vm.CanSubmit = vacancy.CanSubmit; vm.ClosingDate = (vacancy.ClosedDate ?? vacancy.ClosingDate)?.AsGdsDate(); vm.EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); vm.EmployerContactName = vacancy.EmployerContact?.Name; vm.EmployerContactEmail = vacancy.EmployerContact?.Email; vm.EmployerContactTelephone = vacancy.EmployerContact?.Phone; @@ -89,7 +89,7 @@ public async Task MapFromVacancyAsync(DisplayVacancyViewModel vm, Vacancy vacanc { vm.TrainingTitle = programme?.Title; vm.TrainingType = programme?.ApprenticeshipType.GetDisplayName(); - vm.TrainingLevel = programme?.Level.GetDisplayName(); + vm.TrainingLevel = programme?.ApprenticeshipLevel.GetDisplayName(); } if (vacancy.Wage != null) diff --git a/src/Employer/Employer.Web/Orchestrators/Part1/DatesOrchestrator.cs b/src/Employer/Employer.Web/Orchestrators/Part1/DatesOrchestrator.cs index 46c3faeb0c..c21c04985c 100644 --- a/src/Employer/Employer.Web/Orchestrators/Part1/DatesOrchestrator.cs +++ b/src/Employer/Employer.Web/Orchestrators/Part1/DatesOrchestrator.cs @@ -120,7 +120,7 @@ private async Task SetTrainingProgrammeAsync(Vacancy vacancy, DatesViewModel vm) if (programme?.EffectiveTo.HasValue == true) { - vm.TrainingDescription = $"{programme.Title}, Level:{(int)programme.Level}"; + vm.TrainingDescription = $"{programme.Title}, Level:{(int)programme.ApprenticeshipLevel}"; vm.TrainingEffectiveToDate = programme.EffectiveTo.Value.AsGdsDate(); } } diff --git a/src/Employer/Employer.Web/Orchestrators/Part1/TrainingOrchestrator.cs b/src/Employer/Employer.Web/Orchestrators/Part1/TrainingOrchestrator.cs index b35d672c8a..1606d236df 100644 --- a/src/Employer/Employer.Web/Orchestrators/Part1/TrainingOrchestrator.cs +++ b/src/Employer/Employer.Web/Orchestrators/Part1/TrainingOrchestrator.cs @@ -90,14 +90,14 @@ public async Task GetConfirmTrainingViewModelAsync(Vac return new ConfirmTrainingViewModel { ProgrammeId = programme.Id, - Level = programme.Level, + ApprenticeshipLevel = programme.ApprenticeshipLevel, TrainingTitle = programme.Title, DurationMonths = programme.Duration, ProgrammeType = programme.ApprenticeshipType.GetDisplayName(), PageInfo = Utility.GetPartOnePageInfo(vacancyTask.Result), TrainingEffectiveToDate = programme.EffectiveTo?.AsGdsDate(), EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level) + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel) }; } diff --git a/src/Employer/Employer.Web/Orchestrators/VacancyPreviewOrchestrator.cs b/src/Employer/Employer.Web/Orchestrators/VacancyPreviewOrchestrator.cs index 36364d005d..33c2ba1879 100644 --- a/src/Employer/Employer.Web/Orchestrators/VacancyPreviewOrchestrator.cs +++ b/src/Employer/Employer.Web/Orchestrators/VacancyPreviewOrchestrator.cs @@ -69,9 +69,9 @@ public async Task GetVacancyPreviewViewModelAsync(Vacan vm.CanShowDraftHeader = vacancy.Status == VacancyStatus.Draft; vm.SoftValidationErrors = GetSoftValidationErrors(vacancy); vm.EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); - if (programme != null) vm.Level = programme.Level; + if (programme != null) vm.ApprenticeshipLevel = programme.ApprenticeshipLevel; if (vacancy.Status == VacancyStatus.Referred) { diff --git a/src/Employer/Employer.Web/Orchestrators/VacancyViewOrchestrator.cs b/src/Employer/Employer.Web/Orchestrators/VacancyViewOrchestrator.cs index 7afb395cd5..b3fa7978d6 100644 --- a/src/Employer/Employer.Web/Orchestrators/VacancyViewOrchestrator.cs +++ b/src/Employer/Employer.Web/Orchestrators/VacancyViewOrchestrator.cs @@ -49,26 +49,26 @@ public async Task GetFullVacancyDisplayViewModelAsync(V case VacancyStatus.Approved: var approvedViewModel = new ApprovedVacancyViewModel(); approvedViewModel.EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); await _vacancyDisplayMapper.MapFromVacancyAsync(approvedViewModel, vacancy); approvedViewModel.ApprovedDate = vacancy.ApprovedDate.Value.AsGdsDate(); return approvedViewModel; case VacancyStatus.Live: var liveViewModel = new LiveVacancyViewModel(); liveViewModel.EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); await _vacancyDisplayMapper.MapFromVacancyAsync(liveViewModel, vacancy); return liveViewModel; - case VacancyStatus.Closed: + case VacancyStatus.Closed: var closedViewModel = new ClosedVacancyViewModel(); closedViewModel.EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); await _vacancyDisplayMapper.MapFromVacancyAsync(closedViewModel, vacancy); return closedViewModel; case VacancyStatus.Submitted: var submittedViewModel = new SubmittedVacancyViewModel(); submittedViewModel.EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); await _vacancyDisplayMapper.MapFromVacancyAsync(submittedViewModel, vacancy); submittedViewModel.SubmittedDate = vacancy.SubmittedDate.Value.AsGdsDate(); return submittedViewModel; diff --git a/src/Employer/Employer.Web/ViewModels/Part1/Training/ConfirmTrainingViewModel.cs b/src/Employer/Employer.Web/ViewModels/Part1/Training/ConfirmTrainingViewModel.cs index 8462f997b0..1cddd07891 100644 --- a/src/Employer/Employer.Web/ViewModels/Part1/Training/ConfirmTrainingViewModel.cs +++ b/src/Employer/Employer.Web/ViewModels/Part1/Training/ConfirmTrainingViewModel.cs @@ -6,7 +6,7 @@ namespace Esfa.Recruit.Employer.Web.ViewModels.Part1.Training public class ConfirmTrainingViewModel { public string TrainingTitle { get; set; } - public ApprenticeshipLevel Level { get; set; } + public ApprenticeshipLevel ApprenticeshipLevel { get; set; } public int DurationMonths { get; set; } public string ProgrammeType {get; set; } public string ProgrammeId { get; set; } diff --git a/src/Employer/Employer.Web/ViewModels/VacancyPreview/VacancyPreviewViewModel.cs b/src/Employer/Employer.Web/ViewModels/VacancyPreview/VacancyPreviewViewModel.cs index 071485bc59..5067d61ed4 100644 --- a/src/Employer/Employer.Web/ViewModels/VacancyPreview/VacancyPreviewViewModel.cs +++ b/src/Employer/Employer.Web/ViewModels/VacancyPreview/VacancyPreviewViewModel.cs @@ -114,7 +114,7 @@ private bool IsEditRequired(string fieldIdentifier) }.Count(s => s == VacancyPreviewSectionState.Incomplete || s == VacancyPreviewSectionState.InvalidIncomplete); public string IncompleteRequiredSectionText => "section".ToQuantity(IncompleteRequiredSectionCount, ShowQuantityAs.None); - public ApprenticeshipLevel Level { get; set; } + public ApprenticeshipLevel ApprenticeshipLevel { get; set; } public IList OrderedFieldNames => new List { diff --git a/src/Provider/Provider.Web/Mappings/VacancyDisplayViewModelMapper.cs b/src/Provider/Provider.Web/Mappings/VacancyDisplayViewModelMapper.cs index f8843e5ac5..9d5a7bfbbe 100644 --- a/src/Provider/Provider.Web/Mappings/VacancyDisplayViewModelMapper.cs +++ b/src/Provider/Provider.Web/Mappings/VacancyDisplayViewModelMapper.cs @@ -45,7 +45,7 @@ public async Task MapFromVacancyAsync(DisplayVacancyViewModel vm, Vacancy vacanc vm.CanSubmit = vacancy.CanSubmit; vm.ClosingDate = (vacancy.ClosedDate ?? vacancy.ClosingDate)?.AsGdsDate(); vm.EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); vm.EmployerDescription = vacancy.EmployerDescription; vm.EmployerName = await _vacancyClient.GetEmployerNameAsync(vacancy); vm.EmployerWebsiteUrl = vacancy.EmployerWebsiteUrl; @@ -85,7 +85,7 @@ public async Task MapFromVacancyAsync(DisplayVacancyViewModel vm, Vacancy vacanc { vm.TrainingTitle = programme?.Title; vm.TrainingType = programme?.ApprenticeshipType.GetDisplayName(); - vm.TrainingLevel = programme?.Level.GetDisplayName(); + vm.TrainingLevel = programme?.ApprenticeshipLevel.GetDisplayName(); } if (vacancy.Wage != null) diff --git a/src/Provider/Provider.Web/Orchestrators/Part1/DatesOrchestrator.cs b/src/Provider/Provider.Web/Orchestrators/Part1/DatesOrchestrator.cs index 0270fe66ed..8649802ee0 100644 --- a/src/Provider/Provider.Web/Orchestrators/Part1/DatesOrchestrator.cs +++ b/src/Provider/Provider.Web/Orchestrators/Part1/DatesOrchestrator.cs @@ -116,7 +116,7 @@ private async Task SetTrainingProgrammeAsync(Vacancy vacancy, DatesViewModel vm) if (programme?.EffectiveTo.HasValue == true) { - vm.TrainingDescription = $"{programme.Title}, Level:{(int) programme.Level}"; + vm.TrainingDescription = $"{programme.Title}, Level:{(int) programme.ApprenticeshipLevel}"; vm.TrainingEffectiveToDate = programme.EffectiveTo.Value.AsGdsDate(); } } diff --git a/src/Provider/Provider.Web/Orchestrators/Part1/TrainingOrchestrator.cs b/src/Provider/Provider.Web/Orchestrators/Part1/TrainingOrchestrator.cs index 5009a57d6d..6e1817a151 100644 --- a/src/Provider/Provider.Web/Orchestrators/Part1/TrainingOrchestrator.cs +++ b/src/Provider/Provider.Web/Orchestrators/Part1/TrainingOrchestrator.cs @@ -82,14 +82,14 @@ public async Task GetConfirmTrainingViewModelAsync(Vac return new ConfirmTrainingViewModel { ProgrammeId = programme.Id, - Level = programme.Level, + ApprenticeshipLevel = programme.ApprenticeshipLevel, TrainingTitle = programme.Title, DurationMonths = programme.Duration, ProgrammeType = programme.ApprenticeshipType.GetDisplayName(), PageInfo = Utility.GetPartOnePageInfo(vacancyTask.Result), TrainingEffectiveToDate = programme.EffectiveTo?.AsGdsDate(), EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level) + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel) }; } diff --git a/src/Provider/Provider.Web/Orchestrators/VacancyPreviewOrchestrator.cs b/src/Provider/Provider.Web/Orchestrators/VacancyPreviewOrchestrator.cs index 71c3338a41..d418af2c79 100644 --- a/src/Provider/Provider.Web/Orchestrators/VacancyPreviewOrchestrator.cs +++ b/src/Provider/Provider.Web/Orchestrators/VacancyPreviewOrchestrator.cs @@ -69,7 +69,7 @@ public async Task GetVacancyPreviewViewModelAsync(Vacan vm.CanShowDraftHeader = vacancy.Status == VacancyStatus.Draft; vm.SoftValidationErrors = GetSoftValidationErrors(vacancy); - if (programme != null) vm.Level = programme.Level; + if (programme != null) vm.ApprenticeshipLevel = programme.ApprenticeshipLevel; if (vacancy.Status == VacancyStatus.Referred) { diff --git a/src/Provider/Provider.Web/ViewModels/Part1/Training/ConfirmTrainingViewModel.cs b/src/Provider/Provider.Web/ViewModels/Part1/Training/ConfirmTrainingViewModel.cs index 0c4e2f8cc8..6be694e485 100644 --- a/src/Provider/Provider.Web/ViewModels/Part1/Training/ConfirmTrainingViewModel.cs +++ b/src/Provider/Provider.Web/ViewModels/Part1/Training/ConfirmTrainingViewModel.cs @@ -6,7 +6,7 @@ namespace Esfa.Recruit.Provider.Web.ViewModels.Part1.Training public class ConfirmTrainingViewModel { public string TrainingTitle { get; set; } - public ApprenticeshipLevel Level { get; set; } + public ApprenticeshipLevel ApprenticeshipLevel { get; set; } public string EducationLevelName { get; set; } public int DurationMonths { get; set; } public string ProgrammeType {get; set; } diff --git a/src/Provider/Provider.Web/ViewModels/VacancyPreview/VacancyPreviewViewModel.cs b/src/Provider/Provider.Web/ViewModels/VacancyPreview/VacancyPreviewViewModel.cs index 6dcd728722..64432266bf 100644 --- a/src/Provider/Provider.Web/ViewModels/VacancyPreview/VacancyPreviewViewModel.cs +++ b/src/Provider/Provider.Web/ViewModels/VacancyPreview/VacancyPreviewViewModel.cs @@ -114,7 +114,7 @@ public class VacancyPreviewViewModel : DisplayVacancyViewModel public bool VacancyDescriptionRequiresEdit => IsEditRequired(FieldIdentifiers.VacancyDescription); public bool WageRequiresEdit => IsEditRequired(FieldIdentifiers.Wage); public bool WorkingWeekRequiresEdit => IsEditRequired(FieldIdentifiers.WorkingWeek); - public ApprenticeshipLevel Level { get; set; } + public ApprenticeshipLevel ApprenticeshipLevel { get; set; } private bool IsEditRequired(string fieldIdentifier) { return Review.FieldIndicators.Any(f => f.ReviewFieldIdentifier == fieldIdentifier); diff --git a/src/QA/QA.Web/Mappings/ReviewMapper.cs b/src/QA/QA.Web/Mappings/ReviewMapper.cs index 5899961fe8..5167953067 100644 --- a/src/QA/QA.Web/Mappings/ReviewMapper.cs +++ b/src/QA/QA.Web/Mappings/ReviewMapper.cs @@ -168,7 +168,7 @@ await Task.WhenAll( vm.ApplicationUrl = vacancy.ApplicationUrl; vm.ClosingDate = vacancy.ClosingDate?.AsGdsDate(); vm.EducationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); vm.EmployerContactName = vacancy.EmployerContact?.Name; vm.EmployerContactEmail = vacancy.EmployerContact?.Email; vm.EmployerContactTelephone = vacancy.EmployerContact?.Phone; @@ -200,8 +200,8 @@ await Task.WhenAll( vm.VacancyReferenceNumber = $"VAC{vacancy.VacancyReference}"; vm.TrainingTitle = programme.Title; vm.TrainingType = programme.ApprenticeshipType.GetDisplayName(); - vm.TrainingLevel = programme.Level.GetDisplayName(); - vm.Level = programme.Level; + vm.TrainingLevel = programme.ApprenticeshipLevel.GetDisplayName(); + vm.Level = programme.ApprenticeshipLevel; vm.ExpectedDuration = (vacancy.Wage.DurationUnit.HasValue && vacancy.Wage.Duration.HasValue) ? vacancy.Wage.DurationUnit.Value.GetDisplayName().ToQuantity(vacancy.Wage.Duration.Value) : null; diff --git a/src/Shared/Recruit.Shared.Web/Extensions/ApprenticeshipProgrammeMapperExtensions.cs b/src/Shared/Recruit.Shared.Web/Extensions/ApprenticeshipProgrammeMapperExtensions.cs index f448f119a8..0385e74a02 100644 --- a/src/Shared/Recruit.Shared.Web/Extensions/ApprenticeshipProgrammeMapperExtensions.cs +++ b/src/Shared/Recruit.Shared.Web/Extensions/ApprenticeshipProgrammeMapperExtensions.cs @@ -22,7 +22,7 @@ public static IEnumerable ToViewModel( public static ApprenticeshipProgrammeViewModel ToViewModel(this IApprenticeshipProgramme programme) { string educationLevelName = - EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.Level); + EducationLevelNumberHelper.GetEducationLevelNameOrDefault(programme.EducationLevelNumber, programme.ApprenticeshipLevel); return new ApprenticeshipProgrammeViewModel { diff --git a/src/Shared/Recruit.Vacancies.Client/Domain/Entities/ApprenticeshipLevelHelper.cs b/src/Shared/Recruit.Vacancies.Client/Domain/Entities/ApprenticeshipLevelHelper.cs index fb7d7c6d67..275f33fcbe 100644 --- a/src/Shared/Recruit.Vacancies.Client/Domain/Entities/ApprenticeshipLevelHelper.cs +++ b/src/Shared/Recruit.Vacancies.Client/Domain/Entities/ApprenticeshipLevelHelper.cs @@ -4,7 +4,6 @@ namespace Esfa.Recruit.Vacancies.Client.Domain.Entities { public static class ApprenticeshipLevelHelper { - //TODO: PeteM - TryRemapFromEducationLevel public static bool TryRemapFromInt(int value, out ApprenticeshipLevel result) { switch (value) @@ -26,7 +25,6 @@ public static bool TryRemapFromInt(int value, out ApprenticeshipLevel result) return false; } - //TODO: PeteM - RemapFromEducationLevel public static ApprenticeshipLevel RemapFromInt(int value) { if (TryRemapFromInt(value, out ApprenticeshipLevel result)) diff --git a/src/Shared/Recruit.Vacancies.Client/Domain/Entities/IApprenticeshipProgramme.cs b/src/Shared/Recruit.Vacancies.Client/Domain/Entities/IApprenticeshipProgramme.cs index d158aa5b24..dcb44ecf05 100644 --- a/src/Shared/Recruit.Vacancies.Client/Domain/Entities/IApprenticeshipProgramme.cs +++ b/src/Shared/Recruit.Vacancies.Client/Domain/Entities/IApprenticeshipProgramme.cs @@ -9,7 +9,7 @@ public interface IApprenticeshipProgramme string Title { get; } DateTime? EffectiveFrom { get; } DateTime? EffectiveTo { get; } - ApprenticeshipLevel Level { get; } + ApprenticeshipLevel ApprenticeshipLevel { get; } int Duration { get; } bool IsActive { get; set; } int? EducationLevelNumber { get; set; } diff --git a/src/Shared/Recruit.Vacancies.Client/Infrastructure/Extensions/VacancyExtensions.cs b/src/Shared/Recruit.Vacancies.Client/Infrastructure/Extensions/VacancyExtensions.cs index bfe9f888a8..e17e755922 100644 --- a/src/Shared/Recruit.Vacancies.Client/Infrastructure/Extensions/VacancyExtensions.cs +++ b/src/Shared/Recruit.Vacancies.Client/Infrastructure/Extensions/VacancyExtensions.cs @@ -47,7 +47,7 @@ public static T ToVacancyProjectionBase(this Vacancy vacancy, ApprenticeshipP projectedVacancy.NumberOfPositions = vacancy.NumberOfPositions.GetValueOrDefault(); projectedVacancy.OutcomeDescription = vacancy.OutcomeDescription; projectedVacancy.ProgrammeId = vacancy.ProgrammeId; - projectedVacancy.ProgrammeLevel = programme.Level.ToString(); + projectedVacancy.ProgrammeLevel = programme.ApprenticeshipLevel.ToString(); projectedVacancy.ProgrammeType = programme.ApprenticeshipType.ToString(); projectedVacancy.Qualifications = vacancy.Qualifications.ToProjection(); projectedVacancy.ShortDescription = vacancy.ShortDescription; diff --git a/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipApiCollectionExtensions.cs b/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipApiCollectionExtensions.cs index ec8070ab1f..bef30fff77 100644 --- a/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipApiCollectionExtensions.cs +++ b/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipApiCollectionExtensions.cs @@ -21,7 +21,7 @@ public static IEnumerable FilterAndMapToApprenticeshipP IsActive = IsStandardActive(x), EffectiveFrom = x.EffectiveFrom, EffectiveTo = x.EffectiveTo, - Level = ApprenticeshipLevelHelper.RemapFromInt(x.Level), + ApprenticeshipLevel = ApprenticeshipLevelHelper.RemapFromInt(x.Level), EducationLevelNumber = x.Level, Duration = x.Duration }); @@ -40,7 +40,7 @@ public static IEnumerable FilterAndMapToApprenticeshipP IsActive = IsFrameworkActive(x), EffectiveFrom = x.EffectiveFrom, EffectiveTo = x.EffectiveTo, - Level = ApprenticeshipLevelHelper.RemapFromInt(x.Level), + ApprenticeshipLevel = ApprenticeshipLevelHelper.RemapFromInt(x.Level), EducationLevelNumber = x.Level, Duration = x.Duration }); diff --git a/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipProgramme.cs b/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipProgramme.cs index 3f613692c5..7cc30ac2d7 100644 --- a/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipProgramme.cs +++ b/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipProgramme.cs @@ -15,7 +15,7 @@ public class ApprenticeshipProgramme : IApprenticeshipProgramme public DateTime? EffectiveTo { get; set; } - public ApprenticeshipLevel Level { get; set; } + public ApprenticeshipLevel ApprenticeshipLevel { get; set; } public int Duration { get; set; } diff --git a/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipProgrammeEqualityComparer.cs b/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipProgrammeEqualityComparer.cs index f74cbeab1c..7b8db93dec 100644 --- a/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipProgrammeEqualityComparer.cs +++ b/src/Shared/Recruit.Vacancies.Client/Infrastructure/ReferenceData/ApprenticeshipProgrammes/ApprenticeshipProgrammeEqualityComparer.cs @@ -7,7 +7,7 @@ public class ApprenticeshipProgrammeEqualityComparer : IEqualityComparer ap.ApprenticeshipType == TrainingType.Standard).Count().Should().Be(2); firstItem.Id.Equals(secondItem.Id).Should().BeFalse(); - firstItem.Level.Equals(secondItem.Level).Should().BeFalse(); + firstItem.ApprenticeshipLevel.Equals(secondItem.ApprenticeshipLevel).Should().BeFalse(); firstItem.Title.Equals(secondItem.Title).Should().BeFalse(); } @@ -237,7 +237,7 @@ public async Task WhenApprenticeshipsApiReturnsDuplicateFrameworks_ThenOnlyDisti apprenticeshipProgrammesReferenceData.Data.Count().Should().Be(3); apprenticeshipProgrammesReferenceData.Data.Where(ap => ap.ApprenticeshipType == TrainingType.Framework).Count().Should().Be(2); firstItem.Id.Equals(secondItem.Id).Should().BeFalse(); - firstItem.Level.Equals(secondItem.Level).Should().BeFalse(); + firstItem.ApprenticeshipLevel.Equals(secondItem.ApprenticeshipLevel).Should().BeFalse(); firstItem.Title.Equals(secondItem.Title).Should().BeFalse(); }