public async Task <GetEpaoResult> Handle(GetEpaoQuery request, CancellationToken cancellationToken) { var validationResult = await _validator.ValidateAsync(request); if (!validationResult.IsValid()) { throw new ValidationException(validationResult.DataAnnotationResult, null, null); } var apiRequest = new GetEpaoRequest(request.EpaoId); var apiResult = await _assessorsApiClient.Get <GetEpaoResponse>(apiRequest); if (apiResult == default) { throw new NotFoundException <GetEpaoResult>(); } return(new GetEpaoResult { Epao = apiResult }); }
public void Then_The_Url_Is_Correctly_Built( GetEpaoRequest actual) { actual.GetUrl.Should().Be($"api/ao/assessment-organisations/{actual.EpaoId}"); }