public void ShouldGetBarrierByHandler()
        {
            _repository.Add(_processor1, _handler1, _barrier1);
            var barrier2 = _repository.GetBarrierFor(_handler1);

            Assert.Equal(barrier2, _barrier1);
        }
 /// <summary>
 ///  Specify the {@link ExceptionHandler} to use with the event handler.
 /// </summary>
 /// <param name="exceptionHandler">the exception handler to use.</param>
 public void With(IExceptionHandler exceptionHandler)
 {
     ((BatchEventProcessor <T>)consumerRepository
      .GetEventProcessorFor(eventHandler))
     .SetExceptionHandler(exceptionHandler);
     consumerRepository
     .GetBarrierFor(eventHandler)
     .Alert();
 }
        public void ShouldGetBarrierByHandler()
        {
            _consumerRepository.Add(_eventProcessor1, _handler1, _barrier1);

            Assert.That(_consumerRepository.GetBarrierFor(_handler1), Is.SameAs(_barrier1));
        }
 public void ShouldGetBarrierByHandler()
 {
     consumerRepository.Add(eventProcessorMock1.Object, handler1, barrier1.Object);
     Assert.AreEqual(consumerRepository.GetBarrierFor(handler1), barrier1.Object);
 }
Пример #5
0
 /// <summary>
 /// Specify the <see cref="IValueExceptionHandler{T}"/> to use with the event handler.
 /// </summary>
 /// <param name="exceptionHandler">exceptionHandler the exception handler to use.</param>
 public void With(IValueExceptionHandler <T> exceptionHandler)
 {
     ((IValueBatchEventProcessor <T>)_consumerRepository.GetEventProcessorFor(_eventHandler)).SetExceptionHandler(exceptionHandler);
     _consumerRepository.GetBarrierFor(_eventHandler).Alert();
 }
Пример #6
0
        public void ShouldGetBarrierByHandler()
        {
            _consumerRepository.Add(_eventProcessor1.Object, _handler1, _barrier1.Object);

            Assert.That(_consumerRepository.GetBarrierFor(_handler1), Is.EqualTo(_barrier1.Object));
        }