public async Task RecordGatewayFailOutcome(Guid applicationId, string userId, string userName) { _logger.LogInformation($"Recording an oversight gateway fail outcome for application {applicationId}"); var command = new RecordOversightGatewayFailOutcomeCommand { ApplicationId = applicationId, UserId = userId, UserName = userName }; await _applicationApiClient.RecordGatewayFailOutcome(command); }
public async Task Record_oversight_gateway_fail_outcome_updates_oversight_status_and_determined_date() { var command = new RecordOversightGatewayFailOutcomeCommand { ApplicationId = Guid.NewGuid(), UserId = "User Id", UserName = "******" }; _mediator.Setup(x => x.Send(command, It.IsAny <CancellationToken>())).ReturnsAsync(Unit.Value); var result = await _controller.RecordOversightGatewayFailOutcome(command); result.Should().BeOfType <OkResult>(); }
public async Task Handle_Application_Status_Is_Set_To_Unsuccessful() { var request = new RecordOversightGatewayFailOutcomeCommand { ApplicationId = _applicationId, UserId = "test user id", UserName = "******" }; await _handler.Handle(request, new CancellationToken()); _applyRepository.Verify(x => x.Update(It.Is <Domain.Entities.Apply>(apply => apply.ApplicationId == _applicationId && apply.ApplicationStatus == ApplicationStatus.Unsuccessful)), Times.Once); }
public async Task Handle_Oversight_Outcome_Insert_Is_Audited() { var request = new RecordOversightGatewayFailOutcomeCommand { ApplicationId = _applicationId, UserId = "test user id", UserName = "******" }; await _handler.Handle(request, new CancellationToken()); _auditService.Verify(x => x.AuditInsert(It.Is <OversightReview>(r => r.ApplicationId == request.ApplicationId && r.Status == OversightReviewStatus.Unsuccessful && r.UserId == request.UserId && r.UserName == request.UserName))); }
public async Task <ActionResult> RecordOversightGatewayFailOutcome([FromBody] RecordOversightGatewayFailOutcomeCommand command) { await _mediator.Send(command); return(new OkResult()); }
public async Task RecordGatewayFailOutcome(RecordOversightGatewayFailOutcomeCommand command) { await Post("Oversight/GatewayFailOutcome", command); }