public static IEventStreamSubscriber Create(IEventStoreHttpConnection connection, Action <Client.EventInfo> rawEventhandler, IStreamPositionRepository streamPositionRepository)
        {
            var builder = new EventStreamSubscriberSettingsBuilder(connection, null, streamPositionRepository)
                          .WithDefaultPollingInterval(TimeSpan.FromSeconds(1));

            return(new EventStreamSubscriber(builder, rawEventhandler));
        }
        public void Setup()
        {
            _connectionMock = new Mock<IEventStoreHttpConnection>();
            _eventHandlerResolverMock = new Mock<IEventHandlerResolver>();
            _streamPositionRepositoryMock = new Mock<IStreamPositionRepository>();
            _eventTypeResolverMock = new Mock<IEventTypeResolver>();

            _builder = new EventStreamSubscriberSettingsBuilder(_connectionMock.Object, _eventHandlerResolverMock.Object, _streamPositionRepositoryMock.Object).WithCustomEventTypeResolver(_eventTypeResolverMock.Object);
        }