public void should_Send_PartnerTracing() { _sendService.Client = new HttpClient(_handlerMock.Object); var sendTo = new SendManifestPackageDTO(_registry); var responses = _sendService.SendPartnerTracingAsync(sendTo).Result; Assert.NotNull(responses); Assert.False(responses.Select(x => x.IsValid()).Any(x => false)); foreach (var sendManifestResponse in responses) { Console.WriteLine(sendManifestResponse); } }
public IActionResult sendPartnerTracingExtracts([FromBody] SendManifestPackageDTO packageDto) { if (!packageDto.IsValid()) { return(BadRequest()); } try { _htsSendService.SendPartnerTracingAsync(packageDto); return(Ok()); } catch (Exception e) { var msg = $"Error sending Extracts {e.Message}"; Log.Error(e, msg); return(StatusCode(500, msg)); } }