Ejemplo n.º 1
0
        public void should_Send_ClientTest()
        {
            _sendService.Client = new HttpClient(_handlerMock.Object);
            var sendTo = new SendManifestPackageDTO(_registry);

            var responses = _sendService.SendClientTestsAsync(sendTo).Result;

            Assert.NotNull(responses);
            Assert.False(responses.Select(x => x.IsValid()).Any(x => false));
            foreach (var sendManifestResponse in responses)
            {
                Console.WriteLine(sendManifestResponse);
            }
        }
Ejemplo n.º 2
0
 public IActionResult sendClientTestsExtracts([FromBody] SendManifestPackageDTO packageDto)
 {
     if (!packageDto.IsValid())
     {
         return(BadRequest());
     }
     try
     {
         _htsSendService.SendClientTestsAsync(packageDto);
         return(Ok());
     }
     catch (Exception e)
     {
         var msg = $"Error sending Extracts {e.Message}";
         Log.Error(e, msg);
         return(StatusCode(500, msg));
     }
 }