Skip to content

Commit

Permalink
Revert incorrect replaceall
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic NEED authored and Dominic NEED committed Nov 14, 2023
1 parent 74539e3 commit 1f577e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void PopulateOverview_PopulatesApplicationWithExpectedValues()
{
ApplicationReference = "A12345",
ApplicationType = GlobalStrings.JoinAMat,
JoinTrustDtos = new JoinTrustDtos
JoinTrustDetails = new JoinTrustDetails
{
TrustName = "Trust1",
ChangesToTrust = "yes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class AcademisationApplication
public string ApplicationStatus { get; set; }
public string ApplicationReference { get; set; }
public List<Contributor> Contributors { get; set; }
public JoinTrustDtos JoinTrustDtos { get; set; }
public JoinTrustDetails JoinTrustDetails { get; set; }
public FormTrustDtos FormTrustDtos { get; set; }

public List<School> Schools { get; set; }
Expand Down Expand Up @@ -327,7 +327,7 @@ public static Application.Application PopulateOverview(AcademisationApplication
academiesApplicationSchool!.SchoolLeases = new List<Application.Lease>();
academiesApplication.TrustName = academisationApplication.ApplicationType switch
{
GlobalStrings.JoinAMat => academisationApplication.JoinTrustDtos.TrustName,
GlobalStrings.JoinAMat => academisationApplication.JoinTrustDetails.TrustName,
GlobalStrings.FormAMat => academisationApplication.FormTrustDtos.FormTrustProposedNameOfTrust,
_ => academiesApplication.TrustName
};
Expand All @@ -344,16 +344,16 @@ public static Application.Application PopulateOverview(AcademisationApplication

if (academiesApplication.ApplicationType.Equals(GlobalStrings.JoinAMat))
{
academiesApplication.ChangesToTrust = academisationApplication.JoinTrustDtos.ChangesToTrust switch
academiesApplication.ChangesToTrust = academisationApplication.JoinTrustDetails.ChangesToTrust switch
{
"yes" => true,
"no" => false,
_ => academiesApplication.ChangesToTrust
};
academiesApplication.ChangesToTrustExplained = academisationApplication.JoinTrustDtos.ChangesToTrustExplained;
academiesApplication.ChangesToLaGovernance = academisationApplication.JoinTrustDtos.ChangesToLaGovernance;
academiesApplication.ChangesToTrustExplained = academisationApplication.JoinTrustDetails.ChangesToTrustExplained;
academiesApplication.ChangesToLaGovernance = academisationApplication.JoinTrustDetails.ChangesToLaGovernance;
academiesApplication.ChangesToLaGovernanceExplained =
academisationApplication.JoinTrustDtos.ChangesToLaGovernanceExplained;
academisationApplication.JoinTrustDetails.ChangesToLaGovernanceExplained;
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Dfe.PrepareConversions.Data.Models.AcademisationApplication;

public class JoinTrustDtos
public class JoinTrustDetails
{
public int UKPRN { get; set; }

Expand Down

0 comments on commit 1f577e9

Please sign in to comment.