示例#1
0
        public void should_Save_Log_New()
        {
            var diffLog = DiffLog.Create("NDWH", "PatientVisitExtract");

            _repository.SaveLog(diffLog);


            var context      = TestInitializer.ServiceProvider.GetService <ExtractsContext>();
            var savedDiffLog = context.DiffLogs.Find(diffLog.Id);

            Assert.NotNull(savedDiffLog);
        }
示例#2
0
        public Task Handle(DocketExtractSent notification, CancellationToken cancellationToken)
        {
            var diffLog = _repository.GetLog(notification.Docket, notification.Extract);

            if (null != diffLog)
            {
                diffLog.LogSent();
                _repository.SaveLog(diffLog);
            }

            return(Task.CompletedTask);
        }
示例#3
0
        public Task Handle(DocketExtractLoaded notification, CancellationToken cancellationToken)
        {
            var generatedDates = _repository.GenerateDiff(notification.Docket, $"{notification.Extract}s");

            var diffLog = _repository.InitLog(notification.Docket, notification.Extract);

            if (null != diffLog)
            {
                diffLog.LogLoad(generatedDates.MaxCreated, generatedDates.MaxModified);
                _repository.SaveLog(diffLog);
            }

            return(Task.CompletedTask);
        }