Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }