コード例 #1
0
        public ExtractHistory HasStarted(Guid extractId)
        {
            var history = _extractHistoryRepository.GetLatest(extractId);

            if (null == history)
            {
                _extractHistoryRepository.UpdateStatus(extractId, ExtractStatus.Idle);
                return(_extractHistoryRepository.GetLatest(extractId));
            }

            return(history);
        }
コード例 #2
0
        public void should_Find_With_History()
        {
            var dbe = _dbExtractProtocolDtos.Take(1).ToList();

            _psmartExtractService.Find(dbe);
            var history = _extractHistoryRepository.GetLatest(dbe.First().Extract.Id);

            Assert.NotNull(history);
            Assert.AreEqual(ExtractStatus.Found, history.Status);
            Assert.True(history.Stats.HasValue);
            Console.WriteLine(history);
        }