Skip to content

Commit

Permalink
Fixed the commad handler for form a mat
Browse files Browse the repository at this point in the history
  • Loading branch information
paullocknimble committed Oct 25, 2024
1 parent 63602fe commit 727f1cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static Mock<HttpMessageHandler> CreateHttpMessageHandlerMock(HttpStatusCo
public async Task Handle_NoConversionProjectsFound_ReturnsNotFoundCommandResult()
{
// Arrange
var command = _fixture.Create<CreateCompleteConversionProjectsCommand>();
var command = _fixture.Create<CreateCompleteFormAMatConversionProjectsCommand>();
_mockConversionProjectRepository.Setup(repo => repo.GetProjectsToSendToCompleteAsync(It.IsAny<CancellationToken>()))
.ReturnsAsync((IEnumerable<IProject>)null);

Expand Down Expand Up @@ -123,7 +123,7 @@ public async Task Handle_ConversionProjectsExist_SuccessfulResponse_ReturnsComma
// Arrange
_fixture.Customize<ProjectDetails>(x => x.With(x => x.AssignedUser, new User(Guid.NewGuid(), "TestFirst TestLast", "[email protected]")));

var command = _fixture.Create<CreateCompleteConversionProjectsCommand>();
var command = _fixture.Create<CreateCompleteFormAMatConversionProjectsCommand>();
var conversionProjects = _fixture.CreateMany<IProject>().ToList();
var advisoryDecision = _fixture.Create<ConversionAdvisoryBoardDecision>();
var successResponse = _fixture.Create<CreateCompleteProjectSuccessResponse>();
Expand Down Expand Up @@ -171,7 +171,7 @@ public async Task Handle_ConversionProjectsExist_ErrorResponse_ReturnsCommandSuc
// Arrange
_fixture.Customize<ProjectDetails>(x => x.With(x => x.AssignedUser, new User(Guid.NewGuid(), "TestFirst TestLast", "[email protected]")));

var command = _fixture.Create<CreateCompleteConversionProjectsCommand>();
var command = _fixture.Create<CreateCompleteFormAMatConversionProjectsCommand>();
var conversionProjects = _fixture.CreateMany<IProject>().ToList();
var advisoryDecision = _fixture.Create<ConversionAdvisoryBoardDecision>();
var errorResponse = _fixture.Create<CreateCompleteProjectErrorResponse>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace Dfe.Academies.Academisation.Service.Commands.CompleteProject
{
public class CreateCompleteFormAMatConversionProjectsCommandHandler : IRequestHandler<CreateCompleteConversionProjectsCommand, CommandResult>
public class CreateCompleteFormAMatConversionProjectsCommandHandler : IRequestHandler<CreateCompleteFormAMatConversionProjectsCommand, CommandResult>
{
private readonly IConversionProjectRepository _conversionProjectRepository;
private readonly IAdvisoryBoardDecisionRepository _advisoryBoardDecisionRepository;
Expand Down Expand Up @@ -51,7 +51,7 @@ public CreateCompleteFormAMatConversionProjectsCommandHandler(
_logger = logger;
}

public async Task<CommandResult> Handle(CreateCompleteConversionProjectsCommand request,
public async Task<CommandResult> Handle(CreateCompleteFormAMatConversionProjectsCommand request,
CancellationToken cancellationToken)
{
var client = _completeApiClientFactory.Create(_correlationContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal static CompleteFormAMatConversionProjectServiceModel FormAMatFromDomain
lastName,
project.Id,
groupReferenceNumber,
// proposed trust name is held in the name of trust field, trust reference number is not available as it stands
// proposed trust name is held in the name of trust field
project.Details.TrustReferenceNumber,
project.Details.NameOfTrust
);
Expand Down

0 comments on commit 727f1cf

Please sign in to comment.