public ImplementMeService(IKVRepository repository, ILogService logService, IMessageProcessService messageProcessService, IMessageQueService messageQueService) : this(repository, logService, messageProcessService, messageQueService, null) { }
public ImplementMeServiceTest_UpdateMessagesAsync() { var queService = Substitute.For <IMessageQueService>(); queService.UpdateMessagesAsync(Arg.Any <IEnumerable <UpdateBatchRequest> >()) .Returns(Task.FromResult(new ActionResult { IsSuccessfull = true })); _queService = queService; }
public ImplementMeService( IKVRepository repository, ILogService logService, IMessageProcessService messageProcessService, IMessageQueService messageQueService) { _repository = repository; _logservice = logService; _queService = messageQueService; _processService = messageProcessService; }
public ImplementMeService( IUOWStatusService uowStatusService, ILogService logService, IMessageProcessService messageProcessService, IMessageQueService messageQueService) { _uowStatusService = uowStatusService; _logService = logService; _queService = messageQueService; _processService = messageProcessService; _cts = new CancellationTokenSource(); _logId = typeof(ImplementMeService).Name; }
public ImplementMeService(IKVRepository repository, ILogService logService, IMessageProcessService messageProcessService, IMessageQueService messageQueService, CentralizedLock centralizedLock = null, CancellationTokenSource cancellationTokenSource = null, TimeSpan?maxStopWait = null) { _repository = repository; _logservice = logService; _queService = messageQueService; _processService = messageProcessService; _cancellationTokenSource = cancellationTokenSource ?? new CancellationTokenSource(); _maxStopWait = maxStopWait ?? TimeSpan.FromSeconds(5); _centralizedLock = centralizedLock ?? new CentralizedLock(repository, -1, _logservice); }
public ImplementMeServiceTest_FetchMessagesAsync() { var queService = Substitute.For <IMessageQueService>(); queService.GetMessagesFromQueAsync <RingbaUOW>(Arg.Any <int>(), Arg.Any <int>(), Arg.Any <int>()) .Returns(Task.FromResult(new MessageBatchResult <RingbaUOW> { IsSuccessfull = true, NumberOfMessages = 5, Messages = new List <MessageWrapper <RingbaUOW> > { new MessageWrapper <RingbaUOW>(), new MessageWrapper <RingbaUOW>(), new MessageWrapper <RingbaUOW>(), new MessageWrapper <RingbaUOW>(), new MessageWrapper <RingbaUOW>(), }, })); _queService = queService; }