Skip to content

Commit

Permalink
Updated test to account for new isfam param
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic NEED authored and Dominic NEED committed Apr 17, 2024
1 parent 67ab0bf commit f4cbe5a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected TransferProject() { }

public string? ProjectReference { get; private set; }
public string OutgoingTrustUkprn { get; private set; }
public string? OutgoingTrustName{ get; private set; }
public string? OutgoingTrustName { get; private set; }
public string? WhoInitiatedTheTransfer { get; private set; }


Expand Down Expand Up @@ -94,7 +94,7 @@ protected TransferProject() { }
public IReadOnlyCollection<TransferringAcademy> TransferringAcademies => _transferringAcademies;

IReadOnlyCollection<IIntendedTransferBenefit> ITransferProject.IntendedTransferBenefits => _intendedTransferBenefits;
IReadOnlyCollection<ITransferringAcademy> ITransferProject.TransferringAcademies =>
IReadOnlyCollection<ITransferringAcademy> ITransferProject.TransferringAcademies =>
_transferringAcademies;

public DateTime? CreatedOn { get; private set; }
Expand Down Expand Up @@ -133,7 +133,7 @@ public void AssignUser(Guid userId, string userEmail, string userFullName)
}

public void SetFeatures(string whoInitiatedTheTransfer, List<string> specificReasonsForTransfer, string transferType, bool? isCompleted)
{
{
WhoInitiatedTheTransfer = whoInitiatedTheTransfer;
_specificReasonsForTransfer = specificReasonsForTransfer;
TypeOfTransfer = transferType;
Expand Down Expand Up @@ -166,12 +166,12 @@ public void SetTransferringAcademiesSchoolData(string transferringAcademyUkprn,
);
}

public void SetBenefitsAndRisks(bool? anyRisks, bool? equalitiesImpactAssessmentConsidered,
List<string> selectedBenefits, string? otherBenefitValue,
bool? highProfileShouldBeConsidered, string? highProfileFurtherSpecification,
bool? complexLandAndBuildingShouldBeConsidered, string? complexLandAndBuildingFurtherSpecification,
bool? financeAndDebtShouldBeConsidered, string? financeAndDebtFurtherSpecification,
bool? otherRisksShouldBeConsidered, string? otherRisksFurtherSpecification,
public void SetBenefitsAndRisks(bool? anyRisks, bool? equalitiesImpactAssessmentConsidered,
List<string> selectedBenefits, string? otherBenefitValue,
bool? highProfileShouldBeConsidered, string? highProfileFurtherSpecification,
bool? complexLandAndBuildingShouldBeConsidered, string? complexLandAndBuildingFurtherSpecification,
bool? financeAndDebtShouldBeConsidered, string? financeAndDebtFurtherSpecification,
bool? otherRisksShouldBeConsidered, string? otherRisksFurtherSpecification,
bool? isCompleted)
{
AnyRisks = anyRisks;
Expand All @@ -182,7 +182,7 @@ public void SetBenefitsAndRisks(bool? anyRisks, bool? equalitiesImpactAssessment
OtherBenefitValue = otherBenefitValue;

HighProfileShouldBeConsidered = highProfileShouldBeConsidered;
HighProfileFurtherSpecification = highProfileFurtherSpecification;
HighProfileFurtherSpecification = highProfileFurtherSpecification;
ComplexLandAndBuildingShouldBeConsidered = complexLandAndBuildingShouldBeConsidered;
ComplexLandAndBuildingFurtherSpecification = complexLandAndBuildingFurtherSpecification;
FinanceAndDebtShouldBeConsidered = financeAndDebtShouldBeConsidered;
Expand Down Expand Up @@ -219,7 +219,8 @@ public void SetAcademyIncomingTrustName(int academyId, string incomingTrustName)
var transferringAcademy =
TransferringAcademies.SingleOrDefault(x => x.Id == academyId);

if (transferringAcademy != null) {
if (transferringAcademy != null)
{

transferringAcademy.SetIncomingTrustName(incomingTrustName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ public async Task GetByUrn_ShouldReturnExpectedResponse()
var dummyUrn = 1;


// Create a TransferProject
ITransferProject dummyTransferProject = TransferProject.Create(
"dummyOutgoingTrustUkprn",
"out trust",
"dummyIncomingTrustUkprn",
"in trust",
new List<string> { "dummyUkprn1", "dummyUkprn2" },
false,
DateTime.Now
);
// Create a TransferProject
ITransferProject dummyTransferProject = TransferProject.Create(
"dummyOutgoingTrustUkprn",
"out trust",
"dummyIncomingTrustUkprn",
"in trust",
new List<string> { "dummyUkprn1", "dummyUkprn2" },
false,
DateTime.Now
);


// Mock the setup to return the dummy project
Expand All @@ -71,16 +71,16 @@ public async Task GetById_ShouldReturnExpectedResponse()
var dummyId = 1;


// Create a TransferProject
var dummyTransferProject = TransferProject.Create(
"dummyOutgoingTrustUkprn",
"out trust",
"dummyIncomingTrustUkprn",
"in trust",
new List<string> { "dummyUkprn1", "dummyUkprn2" },
false,
DateTime.Now
);
// Create a TransferProject
var dummyTransferProject = TransferProject.Create(
"dummyOutgoingTrustUkprn",
"out trust",
"dummyIncomingTrustUkprn",
"in trust",
new List<string> { "dummyUkprn1", "dummyUkprn2" },
false,
DateTime.Now
);

// Mock the setup to return the dummy project
mockRepository.Setup(repo => repo.GetById(It.IsAny<int>())).Returns(Task.FromResult(dummyTransferProject));
Expand Down Expand Up @@ -268,8 +268,8 @@ public async Task GetProjects_ReturnsFilteredProjects()
// Sample data setup
var dummyProjects = new List<TransferProject>
{
TransferProject.Create("outUkprn1", "Out Trust 1", "inUkprn1", "In Trust 1", new List<string> { "ukprn1" }, DateTime.UtcNow),
TransferProject.Create("outUkprn2", "Out Trust 2", "inUkprn2", "In Trust 2", new List<string> { "ukprn2" }, DateTime.UtcNow)
TransferProject.Create("outUkprn1", "Out Trust 1", "inUkprn1", "In Trust 1", new List<string> { "ukprn1" },false, DateTime.UtcNow),
TransferProject.Create("outUkprn2", "Out Trust 2", "inUkprn2", "In Trust 2", new List<string> { "ukprn2" },false, DateTime.UtcNow)
};

// Expected data setup
Expand Down

0 comments on commit f4cbe5a

Please sign in to comment.