コード例 #1
0
        public void should_Send_PartnerNotificationServices()
        {
            _sendService.Client = new HttpClient(_handlerMock.Object);
            var sendTo = new SendManifestPackageDTO(_registry);

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

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