From cf07e1002e4843e3f0907f7446dbe6041525717d Mon Sep 17 00:00:00 2001
From: SreekanthBadigenchula
<38287434+SreekanthBadigenchula@users.noreply.github.com>
Date: Tue, 21 Jun 2022 15:40:35 +0100
Subject: [PATCH] Revert "PA-369 Bulk upload RPL"
---
...ulkUploadAddDraftApprenticeshipsRequest.cs | 5 ---
...ploadValidateCommandHandlerTestsFixture.cs | 19 ----------
.../BulkUpload/ReservationValidationTests.cs | 38 +------------------
...veAccountLegalEntityCommandHandlerTests.cs | 2 +-
.../ResendInvitationCommandHandlerTests.cs | 4 +-
...ResumeApprenticeshipCommandHandlerTests.cs | 4 +-
.../StopApprenticeshipCommandHandlerTests.cs | 12 +++---
...prenticeshipStopDateCommandHandlerTests.cs | 10 ++---
...lidateApprenticeshipForEditCommandTests.cs | 2 +-
...ToDraftApprenticeshipDetailsMapperTests.cs | 12 ------
.../SFA.DAS.CommitmentsV2.UnitTests.csproj | 2 +-
.../BulkUploadValidateCommandHandler.cs | 1 -
.../ValidatePriorLearning.cs | 37 ------------------
.../Entities/DraftApprenticeshipDetails.cs | 5 ---
...questToDraftApprenticeshipDetailsMapper.cs | 4 --
.../Models/DraftApprenticeship.cs | 8 ----
16 files changed, 19 insertions(+), 146 deletions(-)
delete mode 100644 src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Commands/BulkUploadValidateRequest/ValidatePriorLearning.cs
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.Types/Requests/BulkUploadAddDraftApprenticeshipsRequest.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.Types/Requests/BulkUploadAddDraftApprenticeshipsRequest.cs
index f54a424749..8e98331a60 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.Types/Requests/BulkUploadAddDraftApprenticeshipsRequest.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.Api.Types/Requests/BulkUploadAddDraftApprenticeshipsRequest.cs
@@ -62,10 +62,5 @@ public int? Cost
}
public string EPAOrgId { get; set; }
- public bool? RecognisePriorLearning { get; set; }
-
- public int? DurationReducedBy { get; set; }
-
- public int? PriceReducedBy { get; set; }
}
}
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUpload/BulkUploadValidateCommandHandlerTestsFixture.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUpload/BulkUploadValidateCommandHandlerTestsFixture.cs
index 0e84a88f7c..d9e4576bc5 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUpload/BulkUploadValidateCommandHandlerTestsFixture.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUpload/BulkUploadValidateCommandHandlerTestsFixture.cs
@@ -1,5 +1,4 @@
using AutoFixture;
-using FluentAssertions;
using MediatR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
@@ -288,17 +287,6 @@ public void ValidateError(BulkUploadValidateApiResponse errors, int numberOfErro
Assert.AreEqual(property, errors.BulkUploadValidationErrors[0].Errors[0].Property);
}
- public void ValidateError(BulkUploadValidateApiResponse errors, string property, string errorText)
- {
- errors.Should().NotBeNull();
- errors.BulkUploadValidationErrors.Should().NotBeEmpty();
- errors.BulkUploadValidationErrors[0].Errors.Should().ContainEquivalentOf(new
- {
- Property = property,
- ErrorText = errorText,
- });
- }
-
internal BulkUploadValidateCommandHandlerTestsFixture SetCohortRef(string cohortRef)
{
CsvRecords[0].CohortRef = cohortRef;
@@ -456,13 +444,6 @@ internal void SetOverlappingEmailWithinTheSameCohort(OverlapStatus status)
}
- internal void SetPriorLearning(bool? recognisePriorLearning, int? durationReducedBy = null, int? priceReducedBy = null)
- {
- CsvRecords[0].RecognisePriorLearning = recognisePriorLearning;
- CsvRecords[0].DurationReducedBy = durationReducedBy;
- CsvRecords[0].PriceReducedBy = priceReducedBy;
- }
-
internal void SetUpIncompleteRecord()
{
DraftApprenticeship = new DraftApprenticeship
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUpload/ReservationValidationTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUpload/ReservationValidationTests.cs
index 5af8b92d7e..661b2edd4f 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUpload/ReservationValidationTests.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/BulkUpload/ReservationValidationTests.cs
@@ -1,5 +1,4 @@
-using FluentAssertions;
-using NUnit.Framework;
+using NUnit.Framework;
using System.Linq;
using System.Threading.Tasks;
@@ -32,39 +31,4 @@ public async Task Reservation_Validation_Error_Gets_Added_To_Correct_Row()
Assert.IsTrue(errors.BulkUploadValidationErrors.All(x => x.RowNumber == 1));
}
}
-
- [Ignore("RPL cannot be mandatory in bulk upload until all Providers' software systems are updated", Until = "2022-10-30")]
- public class PriorLearningValidationTests
- {
- [Test]
- public async Task Prior_Learning_Validation_Error()
- {
- var fixture = new BulkUploadValidateCommandHandlerTestsFixture();
- fixture.SetPriorLearning(recognisePriorLearning: null);
-
- var errors = await fixture.Handle();
-
- fixture.ValidateError(errors, "RecognisePriorLearning", "Enter whether prior learning is recognised.");
- }
-
- [Test]
- public async Task Prior_Learning_Duration_Validation_Error()
- {
- var fixture = new BulkUploadValidateCommandHandlerTestsFixture();
- fixture.SetPriorLearning(recognisePriorLearning: true, durationReducedBy: null, priceReducedBy: 1);
-
- var errors = await fixture.Handle();
- fixture.ValidateError(errors, "DurationReducedBy", "Enter the duration this apprenticeship has been reduced by due to prior learning.");
- }
-
- [Test]
- public async Task Prior_Learning_Price_Validation_Error()
- {
- var fixture = new BulkUploadValidateCommandHandlerTestsFixture();
- fixture.SetPriorLearning(recognisePriorLearning: true, durationReducedBy: 1, priceReducedBy: null);
-
- var errors = await fixture.Handle();
- fixture.ValidateError(errors, "PriceReducedBy", "Enter the price this apprenticeship has been reduced by due to prior learning.");
- }
- }
}
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/RemoveAccountLegalEntityCommandHandlerTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/RemoveAccountLegalEntityCommandHandlerTests.cs
index 974e436227..df43ec2a08 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/RemoveAccountLegalEntityCommandHandlerTests.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/RemoveAccountLegalEntityCommandHandlerTests.cs
@@ -37,7 +37,7 @@ public Task Handle_WhenAccountLegalEntityHasAlreadyBeenDeleted_ThenShouldThrowEx
{
return TestExceptionAsync(f => f.SetAccountLegalEntityDeletedBeforeCommand(),
f => f.Handle(),
- (f, r) => r.Should().ThrowAsync());
+ (f, r) => r.Should().Throw());
}
}
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/ResendInvitationCommandHandlerTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/ResendInvitationCommandHandlerTests.cs
index ac555efaf9..4142bcc485 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/ResendInvitationCommandHandlerTests.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/ResendInvitationCommandHandlerTests.cs
@@ -84,7 +84,7 @@ public async Task Handle_WhenHandlingCommand_ThrowErrorWhenNoEmailAddress()
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { ErrorMessage = "Invitation cannot be sent as there is no email associated with apprenticeship" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { ErrorMessage = "Invitation cannot be sent as there is no email associated with apprenticeship" });
}
[Test]
@@ -99,7 +99,7 @@ public async Task Handle_WhenHandlingCommand_ThrowErrorWhenEmailAddressHasBeenCo
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { ErrorMessage = "Email address has been confirmed" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { ErrorMessage = "Email address has been confirmed" });
}
private async Task SetupApprenticeship(Party party = Party.Employer, string email = null, bool? emailAddressConfirmed = null)
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/ResumeApprenticeshipCommandHandlerTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/ResumeApprenticeshipCommandHandlerTests.cs
index a4ef1822aa..6c03937088 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/ResumeApprenticeshipCommandHandlerTests.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/ResumeApprenticeshipCommandHandlerTests.cs
@@ -100,7 +100,7 @@ public async Task Handle_WhenHandlingCommand_ThrowErrorForNonPausedApprenticeshi
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { ErrorMessage = "Only paused record can be activated" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { ErrorMessage = "Only paused record can be activated" });
}
[Test]
@@ -122,7 +122,7 @@ public async Task Handle_WhenHandlingCommand_ThrowDomainExceptionIfPartyIsNotEmp
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { ErrorMessage = $"Only employers are allowed to edit the end of completed records - {party} is invalid" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { ErrorMessage = $"Only employers are allowed to edit the end of completed records - {party} is invalid" });
}
private async Task SetupApprenticeship(Party party = Party.Employer, PaymentStatus paymentStatus = PaymentStatus.Paused, DateTime? startDate = null)
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/StopApprenticeshipCommandHandlerTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/StopApprenticeshipCommandHandlerTests.cs
index 5269ee4001..99cd390203 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/StopApprenticeshipCommandHandlerTests.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/StopApprenticeshipCommandHandlerTests.cs
@@ -118,7 +118,7 @@ public async Task Handle_WhenHandlingCommand_WithInvalidCallingParty_ThenShouldT
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { ErrorMessage = "StopApprenticeship is restricted to Employers only - Provider is invalid" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { ErrorMessage = "StopApprenticeship is restricted to Employers only - Provider is invalid" });
}
[Test]
@@ -135,7 +135,7 @@ public async Task Handle_WhenHandlingCommand_WithInvalidApprenticeshipForStop_Pa
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "PaymentStatus", ErrorMessage = "Apprenticeship must be Active or Paused. Unable to stop apprenticeship" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "PaymentStatus", ErrorMessage = "Apprenticeship must be Active or Paused. Unable to stop apprenticeship" });
}
[Test, MoqAutoData]
@@ -150,7 +150,7 @@ public async Task Handle_WhenHandlingCommand_WithMismatchedAccountId_ThenShouldT
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "accountId", ErrorMessage = $"Employer {command.AccountId} not authorised to access commitment {apprenticeship.Cohort.Id}, expected employer {apprenticeship.Cohort.EmployerAccountId}" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "accountId", ErrorMessage = $"Employer {command.AccountId} not authorised to access commitment {apprenticeship.Cohort.Id}, expected employer {apprenticeship.Cohort.EmployerAccountId}" });
}
[Test, MoqAutoData]
@@ -164,7 +164,7 @@ public async Task Handle_WhenHandlingCommand_WithApprenticeshipWaitingToStart_Wi
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "stopDate", ErrorMessage = $"Invalid stop date. Date should be value of start date if training has not started." });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "stopDate", ErrorMessage = $"Invalid stop date. Date should be value of start date if training has not started." });
}
[Test, MoqAutoData]
@@ -179,7 +179,7 @@ public async Task Handle_WhenHandlingCommand_WhenValidatingApprenticeship_WithSt
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "stopDate", ErrorMessage = $"Invalid Stop Date. Stop date cannot be in the future and must be the 1st of the month." });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "stopDate", ErrorMessage = $"Invalid Stop Date. Stop date cannot be in the future and must be the 1st of the month." });
}
[Test, MoqAutoData]
@@ -194,7 +194,7 @@ public async Task Handle_WhenHandlingCommand_WhenValidatingApprenticeship_WithSt
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "stopDate", ErrorMessage = $"Invalid Stop Date. Stop date cannot be before the apprenticeship has started." });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "stopDate", ErrorMessage = $"Invalid Stop Date. Stop date cannot be before the apprenticeship has started." });
}
[Test, MoqAutoData]
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/UpdateApprenticeshipStopDateCommandHandlerTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/UpdateApprenticeshipStopDateCommandHandlerTests.cs
index 13d55a6823..9b7699766d 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/UpdateApprenticeshipStopDateCommandHandlerTests.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Application/Commands/UpdateApprenticeshipStopDateCommandHandlerTests.cs
@@ -130,7 +130,7 @@ public async Task Handle_WhenHandlingCommand_WithInvalidCallingParty_ThenShouldT
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { ErrorMessage = "UpdateApprenticeshipStopDate is restricted to Employers only - Provider is invalid" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { ErrorMessage = "UpdateApprenticeshipStopDate is restricted to Employers only - Provider is invalid" });
}
[Test]
@@ -144,7 +144,7 @@ public async Task Handle_WhenHandlingCommand_WithInvalidApprenticeshipForStop_Pa
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "newStopDate", ErrorMessage = "Apprenticeship must be stopped in order to update stop date" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "newStopDate", ErrorMessage = "Apprenticeship must be stopped in order to update stop date" });
}
[Test]
@@ -159,7 +159,7 @@ public async Task Handle_WhenHandlingCommand_WhenValidatingApprenticeship_WithSt
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "newStopDate", ErrorMessage = "Invalid Date of Change. Date cannot be in the future." });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "newStopDate", ErrorMessage = "Invalid Date of Change. Date cannot be in the future." });
}
@@ -174,7 +174,7 @@ public async Task Handle_WhenHandlingCommand_WhenValidatingApprenticeship_WithSt
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "newStopDate", ErrorMessage = "The stop month cannot be before the apprenticeship started" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "newStopDate", ErrorMessage = "The stop month cannot be before the apprenticeship started" });
}
[Test]
@@ -191,7 +191,7 @@ public async Task Handle_WhenHandlingCommand_WithValidateEndDateOverlap_ThenShou
var exception = Assert.ThrowsAsync(async () => await _handler.Handle(command, new CancellationToken()));
// Assert
- exception.DomainErrors.Should().ContainEquivalentOf(new { PropertyName = "newStopDate", ErrorMessage = $"The date overlaps with existing dates for the same apprentice" });
+ exception.DomainErrors.Should().BeEquivalentTo(new { PropertyName = "newStopDate", ErrorMessage = $"The date overlaps with existing dates for the same apprentice" });
}
[Test]
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Mapping/Apprenticeships/EditValidation/ValidateApprenticeshipForEditRequestToValidateApprenticeshipForEditCommandTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Mapping/Apprenticeships/EditValidation/ValidateApprenticeshipForEditRequestToValidateApprenticeshipForEditCommandTests.cs
index 3b893e8c57..eb6add2399 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Mapping/Apprenticeships/EditValidation/ValidateApprenticeshipForEditRequestToValidateApprenticeshipForEditCommandTests.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Mapping/Apprenticeships/EditValidation/ValidateApprenticeshipForEditRequestToValidateApprenticeshipForEditCommandTests.cs
@@ -27,7 +27,7 @@ public async Task Then_Maps_ValidateApprenticeshipForEditRequestToValidateAppren
result.ApprenticeshipValidationRequest.EmployerReference.Should().BeEquivalentTo(source.EmployerReference);
result.ApprenticeshipValidationRequest.StartDate.Should().Be(source.StartDate);
result.ApprenticeshipValidationRequest.EndDate.Should().Be(source.EndDate);
- result.ApprenticeshipValidationRequest.DeliveryModel.Should().Be(source.DeliveryModel);
+ result.ApprenticeshipValidationRequest.DeliveryModel.Should().BeEquivalentTo(source.DeliveryModel);
result.ApprenticeshipValidationRequest.CourseCode.Should().BeEquivalentTo(source.TrainingCode);
result.ApprenticeshipValidationRequest.ProviderReference.Should().BeEquivalentTo(source.ProviderReference);
result.ApprenticeshipValidationRequest.Email.Should().Be(source.Email);
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Mapping/BulkUpload/BulkUploadDraftApprenticeshipRequestToDraftApprenticeshipDetailsMapperTests.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Mapping/BulkUpload/BulkUploadDraftApprenticeshipRequestToDraftApprenticeshipDetailsMapperTests.cs
index 2d9e37d1ba..e312a47a23 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Mapping/BulkUpload/BulkUploadDraftApprenticeshipRequestToDraftApprenticeshipDetailsMapperTests.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/Mapping/BulkUpload/BulkUploadDraftApprenticeshipRequestToDraftApprenticeshipDetailsMapperTests.cs
@@ -166,18 +166,6 @@ public void TrainingProgrammeIsMappedCorrectly()
Assert.AreEqual(_trainingProgramme.EffectiveTo, rs.TrainingProgramme.EffectiveTo);
}
}
-
- [Test]
- public void PriorLearningIsMappedCorrectly()
- {
- foreach (var source in _source.BulkUploadDraftApprenticeships)
- {
- var result = _result.First(y => y.Uln == source.Uln);
- Assert.AreEqual(source.RecognisePriorLearning, result.RecognisePriorLearning);
- Assert.AreEqual(source.DurationReducedBy, result.DurationReducedBy);
- Assert.AreEqual(source.PriceReducedBy, result.PriceReducedBy);
- }
- }
}
public class BulkUploadAddDraftApprenticeshipRequestSpecimenBuilder : ISpecimenBuilder
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/SFA.DAS.CommitmentsV2.UnitTests.csproj b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/SFA.DAS.CommitmentsV2.UnitTests.csproj
index 7dfcc9867d..007194a8cc 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/SFA.DAS.CommitmentsV2.UnitTests.csproj
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2.UnitTests/SFA.DAS.CommitmentsV2.UnitTests.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Commands/BulkUploadValidateRequest/BulkUploadValidateCommandHandler.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Commands/BulkUploadValidateRequest/BulkUploadValidateCommandHandler.cs
index 0f1f2095dc..add67dee06 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Commands/BulkUploadValidateRequest/BulkUploadValidateCommandHandler.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Commands/BulkUploadValidateRequest/BulkUploadValidateCommandHandler.cs
@@ -157,7 +157,6 @@ private async Task> Validate(BulkUploadAddDraftApprenticeshipRequest
domainErrors.AddRange(ValidateProviderRef(csvRecord));
domainErrors.AddRange(ValidateEPAOrgId(csvRecord));
domainErrors.AddRange(ValidateReservation(csvRecord, reservationValidationResults));
- domainErrors.AddRange(ValidatePriorLearning(csvRecord));
return domainErrors;
}
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Commands/BulkUploadValidateRequest/ValidatePriorLearning.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Commands/BulkUploadValidateRequest/ValidatePriorLearning.cs
deleted file mode 100644
index ff2833fdf3..0000000000
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Application/Commands/BulkUploadValidateRequest/ValidatePriorLearning.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using MediatR;
-using SFA.DAS.CommitmentsV2.Api.Types.Requests;
-using SFA.DAS.CommitmentsV2.Api.Types.Responses;
-using System.Collections.Generic;
-
-namespace SFA.DAS.CommitmentsV2.Application.Commands.BulkUploadValidateRequest
-{
- public partial class BulkUploadValidateCommandHandler : IRequestHandler
- {
- private IEnumerable ValidatePriorLearning(BulkUploadAddDraftApprenticeshipRequest csvRecord)
- {
- // This validation cannot be enabled until the bulk upload file format change has been communicated
- // and software integrators have had time to update their systems.
-
- //if (csvRecord.RecognisePriorLearning == false)
- //{
- yield break;
- //}
-
- //if (csvRecord.RecognisePriorLearning == null)
- //{
- // yield return new Error("RecognisePriorLearning", "Enter whether prior learning is recognised.");
- // yield break;
- //}
-
- //if (csvRecord.DurationReducedBy == null)
- //{
- // yield return new Error("DurationReducedBy", "Enter the duration this apprenticeship has been reduced by due to prior learning.");
- //}
-
- //if (csvRecord.PriceReducedBy == null)
- //{
- // yield return new Error("PriceReducedBy", "Enter the price this apprenticeship has been reduced by due to prior learning.");
- //}
- }
- }
-}
\ No newline at end of file
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Domain/Entities/DraftApprenticeshipDetails.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Domain/Entities/DraftApprenticeshipDetails.cs
index bba8416cda..8c9d054ba5 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Domain/Entities/DraftApprenticeshipDetails.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Domain/Entities/DraftApprenticeshipDetails.cs
@@ -44,10 +44,5 @@ public int? AgeOnStartDate
}
public string StandardUId { get ; set ; }
- public bool? RecognisePriorLearning { get; set; }
-
- public int? DurationReducedBy { get; set; }
-
- public int? PriceReducedBy { get; set; }
}
}
\ No newline at end of file
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Mapping/BulkUpload/BulkUploadAddDraftApprenticeshipRequestToDraftApprenticeshipDetailsMapper.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Mapping/BulkUpload/BulkUploadAddDraftApprenticeshipRequestToDraftApprenticeshipDetailsMapper.cs
index 5b70ada279..cb9c667690 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Mapping/BulkUpload/BulkUploadAddDraftApprenticeshipRequestToDraftApprenticeshipDetailsMapper.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Mapping/BulkUpload/BulkUploadAddDraftApprenticeshipRequestToDraftApprenticeshipDetailsMapper.cs
@@ -36,10 +36,6 @@ public async Task> Map(BulkUploadAddDraftAppren
Reference = source.ProviderRef,
ReservationId = source.ReservationId,
DeliveryModel = Types.DeliveryModel.Regular,
- RecognisePriorLearning = source.RecognisePriorLearning,
- DurationReducedBy = source.DurationReducedBy,
- PriceReducedBy = source.PriceReducedBy,
-
};
await MapTrainingProgramme(source, result);
draftApprenticeshipDetailsList.Add(result);
diff --git a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/DraftApprenticeship.cs b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/DraftApprenticeship.cs
index 97c7c82a51..5f480f8abb 100644
--- a/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/DraftApprenticeship.cs
+++ b/src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/DraftApprenticeship.cs
@@ -108,14 +108,6 @@ public void Merge(DraftApprenticeshipDetails source, Party modifyingParty)
FlexibleEmployment.EmploymentEndDate = null;
}
- RecognisePriorLearning = source.RecognisePriorLearning;
- if(RecognisePriorLearning == true)
- {
- PriorLearning ??= new ApprenticeshipPriorLearning();
- PriorLearning.DurationReducedBy = source.DurationReducedBy;
- PriorLearning.PriceReducedBy = source.PriceReducedBy;
- }
-
ClearPriorLearningWhenStartDateBeforeAug2022();
}