diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data.Tests/Services/SchoolPerformanceServiceTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data.Tests/Services/SchoolPerformanceServiceTests.cs index bbcc6b9c4..353c722d7 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data.Tests/Services/SchoolPerformanceServiceTests.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data.Tests/Services/SchoolPerformanceServiceTests.cs @@ -79,6 +79,6 @@ public async Task Should_log_warning_when_school_performance_not_found(AcademyCo public class EstablishmentMockData { - public MisEstablishmentDto MisEstablishment { get; set; } + public MisEstablishmentResponse MisEstablishment { get; set; } } } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/AcademisationApplication.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/AcademisationApplication.cs index 1c588816f..6e408e47d 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/AcademisationApplication.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/AcademisationApplication.cs @@ -15,7 +15,7 @@ public class AcademisationApplication public string ApplicationReference { get; set; } public List Contributors { get; set; } public JoinTrustDetails JoinTrustDetails { get; set; } - public FormTrustDtos FormTrustDtos { get; set; } + public FormTrustDetails FormTrustDetails { get; set; } public List Schools { get; set; } @@ -23,7 +23,7 @@ public static Application.Application MapToApplication(AcademisationApplication { // Following the fields used by the front end Application.Application academiesApplication = PopulateOverview(academisationApplication, out School academisationApplicationSchool, out ApplyingSchool academiesApplicationSchool, schoolName); - if(academiesApplication.ApplicationType.Equals(GlobalStrings.FormAMat)) PopulateFormAMatTrustInformation(academiesApplication, academisationApplication); + if (academiesApplication.ApplicationType.Equals(GlobalStrings.FormAMat)) PopulateFormAMatTrustInformation(academiesApplication, academisationApplication); PopulateSchoolDetails(academiesApplicationSchool, academisationApplicationSchool); PopulateFurtherInformation(academiesApplicationSchool, academisationApplicationSchool); PopulateSchoolFinances(academiesApplicationSchool, academisationApplicationSchool); @@ -41,21 +41,21 @@ public static Application.Application MapToApplication(AcademisationApplication private static void PopulateFormAMatTrustInformation(Application.Application academiesApplication, AcademisationApplication academisationApplication) { - academiesApplication.FormTrustOpeningDate = academisationApplication.FormTrustDtos.FormTrustOpeningDate; - academiesApplication.TrustApproverName = academisationApplication.FormTrustDtos.TrustApproverName; - academiesApplication.TrustApproverEmail = academisationApplication.FormTrustDtos.TrustApproverEmail; - academiesApplication.FormTrustReasonForming = academisationApplication.FormTrustDtos.FormTrustReasonForming; - academiesApplication.FormTrustReasonVision = academisationApplication.FormTrustDtos.FormTrustReasonVision; - academiesApplication.FormTrustReasonGeoAreas = academisationApplication.FormTrustDtos.FormTrustReasonGeoAreas; - academiesApplication.FormTrustReasonFreedom = academisationApplication.FormTrustDtos.FormTrustReasonFreedom; - academiesApplication.FormTrustReasonImproveTeaching = academisationApplication.FormTrustDtos.FormTrustReasonImproveTeaching; - academiesApplication.FormTrustGrowthPlansYesNo = academisationApplication.FormTrustDtos.FormTrustGrowthPlansYesNo; - academiesApplication.FormTrustPlanForGrowth = academisationApplication.FormTrustDtos.FormTrustPlanForGrowth; - academiesApplication.FormTrustPlansForNoGrowth = academisationApplication.FormTrustDtos.FormTrustPlansForNoGrowth; - academiesApplication.FormTrustImprovementSupport = academisationApplication.FormTrustDtos.FormTrustImprovementSupport; - academiesApplication.FormTrustImprovementStrategy = academisationApplication.FormTrustDtos.FormTrustImprovementStrategy; - academiesApplication.FormTrustImprovementApprovedSponsor = academisationApplication.FormTrustDtos.FormTrustImprovementApprovedSponsor; - academiesApplication.KeyPeople = academisationApplication.FormTrustDtos.KeyPeople; + academiesApplication.FormTrustOpeningDate = academisationApplication.FormTrustDetails.FormTrustOpeningDate; + academiesApplication.TrustApproverName = academisationApplication.FormTrustDetails.TrustApproverName; + academiesApplication.TrustApproverEmail = academisationApplication.FormTrustDetails.TrustApproverEmail; + academiesApplication.FormTrustReasonForming = academisationApplication.FormTrustDetails.FormTrustReasonForming; + academiesApplication.FormTrustReasonVision = academisationApplication.FormTrustDetails.FormTrustReasonVision; + academiesApplication.FormTrustReasonGeoAreas = academisationApplication.FormTrustDetails.FormTrustReasonGeoAreas; + academiesApplication.FormTrustReasonFreedom = academisationApplication.FormTrustDetails.FormTrustReasonFreedom; + academiesApplication.FormTrustReasonImproveTeaching = academisationApplication.FormTrustDetails.FormTrustReasonImproveTeaching; + academiesApplication.FormTrustGrowthPlansYesNo = academisationApplication.FormTrustDetails.FormTrustGrowthPlansYesNo; + academiesApplication.FormTrustPlanForGrowth = academisationApplication.FormTrustDetails.FormTrustPlanForGrowth; + academiesApplication.FormTrustPlansForNoGrowth = academisationApplication.FormTrustDetails.FormTrustPlansForNoGrowth; + academiesApplication.FormTrustImprovementSupport = academisationApplication.FormTrustDetails.FormTrustImprovementSupport; + academiesApplication.FormTrustImprovementStrategy = academisationApplication.FormTrustDetails.FormTrustImprovementStrategy; + academiesApplication.FormTrustImprovementApprovedSponsor = academisationApplication.FormTrustDetails.FormTrustImprovementApprovedSponsor; + academiesApplication.KeyPeople = academisationApplication.FormTrustDetails.KeyPeople; } @@ -63,7 +63,7 @@ public static void PopulateDeclaration(ApplyingSchool academiesApplicationSchool School academisationApplicationSchool) { academiesApplicationSchool.DeclarationBodyAgree = academisationApplicationSchool.DeclarationBodyAgree; - + } public static void PopulateConsultation(ApplyingSchool academiesApplicationSchool, @@ -92,7 +92,7 @@ public static void PopulateLandAndBuildings(ApplyingSchool academiesApplicationS academisationApplicationSchool.LandAndBuildings.FacilitiesSharedExplained; academiesApplicationSchool.SchoolBuildLandGrants = academisationApplicationSchool.LandAndBuildings.Grants; academiesApplicationSchool.SchoolBuildLandGrantsExplained = - academisationApplicationSchool.LandAndBuildings.GrantsAwardingBodies; + academisationApplicationSchool.LandAndBuildings.GrantsAwardingBodies; academiesApplicationSchool.SchoolBuildLandPFIScheme = academisationApplicationSchool.LandAndBuildings.PartOfPfiScheme; academiesApplicationSchool.SchoolBuildLandPFISchemeType = @@ -225,31 +225,31 @@ public static void PopulateFurtherInformation(ApplyingSchool academiesApplicatio // Further Information academiesApplicationSchool.SchoolAdSchoolContributionToTrust = academisationApplicationSchool - .TrustBenefitDetails; - academiesApplicationSchool.SchoolAdInspectedButReportNotPublished = !academisationApplicationSchool.OfstedInspectionDetails.IsNullOrEmpty(); + .TrustBenefitDetails; + academiesApplicationSchool.SchoolAdInspectedButReportNotPublished = !academisationApplicationSchool.OfstedInspectionDetails.IsNullOrEmpty(); academiesApplicationSchool.SchoolAdInspectedButReportNotPublishedExplain = academisationApplicationSchool.OfstedInspectionDetails; academiesApplicationSchool.SchoolOngoingSafeguardingInvestigations = - academisationApplicationSchool.Safeguarding; + academisationApplicationSchool.Safeguarding; // Questions regarding the below are outstanding // academiesApplicationSchool.SchoolOngoingSafeguardingDetails = academisationApplicationSchool.SafeguardingDetails; academiesApplicationSchool.SchoolPartOfLaReorganizationPlan = !academisationApplicationSchool.LocalAuthorityReorganisationDetails - .IsNullOrEmpty(); + .IsNullOrEmpty(); academiesApplicationSchool.SchoolLaReorganizationDetails = academisationApplicationSchool.LocalAuthorityReorganisationDetails; academiesApplicationSchool.SchoolPartOfLaClosurePlan = !academisationApplicationSchool.LocalAuthorityClosurePlanDetails.IsNullOrEmpty(); academiesApplicationSchool.SchoolLaClosurePlanDetails = academisationApplicationSchool - .LocalAuthorityClosurePlanDetails; + .LocalAuthorityClosurePlanDetails; academiesApplicationSchool.SchoolFaithSchool = !academisationApplicationSchool.DioceseName - .IsNullOrEmpty(); + .IsNullOrEmpty(); academiesApplicationSchool.SchoolFaithSchoolDioceseName = academisationApplicationSchool.DioceseName; academiesApplicationSchool.SchoolIsPartOfFederation = academisationApplicationSchool.PartOfFederation; academiesApplicationSchool.SchoolIsSupportedByFoundation = - !academisationApplicationSchool.FoundationTrustOrBodyName.IsNullOrEmpty(); + !academisationApplicationSchool.FoundationTrustOrBodyName.IsNullOrEmpty(); academiesApplicationSchool.SchoolSupportedFoundationBodyName = academisationApplicationSchool.FoundationTrustOrBodyName; if (academisationApplicationSchool.ExemptionEndDate is not null) @@ -268,9 +268,9 @@ public static void PopulateFurtherInformation(ApplyingSchool academiesApplicatio _ => string.Empty }; academiesApplicationSchool.SchoolAdditionalInformationAdded = - !academisationApplicationSchool.FurtherInformation.IsNullOrEmpty(); + !academisationApplicationSchool.FurtherInformation.IsNullOrEmpty(); academiesApplicationSchool.SchoolAdditionalInformation = - academisationApplicationSchool.FurtherInformation; + academisationApplicationSchool.FurtherInformation; } public static void PopulateSchoolDetails(ApplyingSchool academiesApplicationSchool, @@ -328,7 +328,7 @@ public static Application.Application PopulateOverview(AcademisationApplication academiesApplication.TrustName = academisationApplication.ApplicationType switch { GlobalStrings.JoinAMat => academisationApplication.JoinTrustDetails.TrustName, - GlobalStrings.FormAMat => academisationApplication.FormTrustDtos.FormTrustProposedNameOfTrust, + GlobalStrings.FormAMat => academisationApplication.FormTrustDetails.FormTrustProposedNameOfTrust, _ => academiesApplication.TrustName }; @@ -355,8 +355,8 @@ public static Application.Application PopulateOverview(AcademisationApplication academiesApplication.ChangesToLaGovernanceExplained = academisationApplication.JoinTrustDetails.ChangesToLaGovernanceExplained; } - - + + return academiesApplication; } } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/FormTrustDetails.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/FormTrustDetails.cs index 15322b0f6..247103107 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/FormTrustDetails.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/FormTrustDetails.cs @@ -8,7 +8,7 @@ namespace Dfe.PrepareConversions.Data.Models.AcademisationApplication { - public class FormTrustDtos + public class FormTrustDetails { public DateTime? FormTrustOpeningDate { get; set; } public string? FormTrustProposedNameOfTrust { get; set; } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/Establishment/EstablishmentResponse.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/Establishment/EstablishmentResponse.cs index 027e47206..314b9b1b6 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/Establishment/EstablishmentResponse.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/Establishment/EstablishmentResponse.cs @@ -22,7 +22,7 @@ public class EstablishmentResponse public string SchoolCapacity { get; set; } public CensusResponse Census { get; set; } public NameAndCodeDto ParliamentaryConstituency { get; set; } - public MisEstablishmentDto MISEstablishment { get; set; } + public MisEstablishmentResponse MISEstablishment { get; set; } public AddressResponse Address { get; set; } public ViewAcademyConversion ViewAcademyConversion { get; set; } public string OpenDate { get; set; } diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/Establishment/MISEstablishmentResponse.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/Establishment/MISEstablishmentResponse.cs index f6bdba621..57254463f 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/Establishment/MISEstablishmentResponse.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/Establishment/MISEstablishmentResponse.cs @@ -1,6 +1,6 @@ namespace Dfe.PrepareConversions.Data.Models.Establishment; -public class MisEstablishmentDto +public class MisEstablishmentResponse { public string DateOfLatestSection8Inspection { get; set; } public string InspectionEndDate { get; set; }