Exemple #1
0
 public IActionResult GetAllExtractCount()
 {
     try
     {
         var count = _masterPatientIndexRepository.GetAll().Count();
         return(Ok(count));
     }
     catch (Exception e)
     {
         var msg = $"Error loading {nameof(Extract)}(s)";
         Log.Error(msg);
         Log.Error($"{e}");
         return(StatusCode(500, msg));
     }
 }
        public void shoul_Update_Sent_Items()
        {
            var mpiIds    = _indices.Select(x => x.Id).ToList();
            var sentItems = mpiIds.Select(x => new SentItem(x, SendStatus.Sent)).ToList();

            _repository.UpdateSendStatus(sentItems);

            _repository = TestInitializer.ServiceProvider.GetService <IMasterPatientIndexRepository>();
            var updated = _repository.GetAll(x => x.Status == $"{nameof(SendStatus.Sent)}").ToList();

            Assert.True(updated.Count == 2);
        }