public void should_Send_TestKits() { _sendService.Client = new HttpClient(_handlerMock.Object); var sendTo = new SendManifestPackageDTO(_registry); var responses = _sendService.SendTestKitsAsync(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 sendTestKitsExtracts([FromBody] SendManifestPackageDTO packageDto) { if (!packageDto.IsValid()) { return(BadRequest()); } try { _htsSendService.SendTestKitsAsync(packageDto); return(Ok()); } catch (Exception e) { var msg = $"Error sending Extracts {e.Message}"; Log.Error(e, msg); return(StatusCode(500, msg)); } }