public void SetUp()
        {
            _timeService     = new Mock <ITimeService>();
            _queueRepository = new Mock <IQueueRepository>();

            _target = new DatabaseMessageQueue(_timeService.Object, _queueRepository.Object);

            _key = MessageQueueKeys.Notifications;
        }
        public DatabaseQueueReader(
            [NotNull] ITimeService timeService,
            [NotNull] IQueueRepository queueRepository,
            MessageQueueKeys key)
        {
            if (timeService == null)
            {
                throw new ArgumentNullException(nameof(timeService));
            }
            if (queueRepository == null)
            {
                throw new ArgumentNullException(nameof(queueRepository));
            }

            _timeService     = timeService;
            _queueRepository = queueRepository;
            _key             = key;
        }
 public IQueueWriter BeginWrite(MessageQueueKeys key) =>
 new DatabaseQueueWriter(_timeService, _queueRepository, key);