public void SetUp()
            {
                _client = new ElasticsearchClient();
                _calls  = new List <ElasticsearchProjectionHandlerCall>();
                var handler1 = new ElasticsearchProjectionHandler(
                    typeof(MatchMessage1),
                    (client, msg, token) =>
                {
                    _calls.Add(new ElasticsearchProjectionHandlerCall(client, msg, token));
                    return(Task.FromResult(false));
                });
                var handler2 = new ElasticsearchProjectionHandler(
                    typeof(MatchMessage2),
                    (client, msg, token) =>
                {
                    _calls.Add(new ElasticsearchProjectionHandlerCall(client, msg, token));
                    return(Task.FromResult(false));
                });
                var handler3 = new ElasticsearchProjectionHandler(
                    typeof(MatchMessage1),
                    (client, msg, token) =>
                {
                    _calls.Add(new ElasticsearchProjectionHandlerCall(client, msg, token));
                    return(Task.FromResult(false));
                });
                var handler4 = new ElasticsearchProjectionHandler(
                    typeof(MatchMessage2),
                    (client, msg, token) =>
                {
                    _calls.Add(new ElasticsearchProjectionHandlerCall(client, msg, token));
                    return(Task.FromResult(false));
                });

                _sut = SutFactory(new[] { handler1, handler2, handler3, handler4 });
            }
 public void SetUp()
 {
     _client = new ElasticsearchClient();
     _calls = new List<ElasticsearchProjectionHandlerCall>();
     var handler1 = new ElasticsearchProjectionHandler(
         typeof(MatchMessage1),
         (client, msg, token) =>
         {
             _calls.Add(new ElasticsearchProjectionHandlerCall(client, msg, token));
             return Task.FromResult(false);
         });
     var handler2 = new ElasticsearchProjectionHandler(
         typeof(MatchMessage2),
         (client, msg, token) =>
         {
             _calls.Add(new ElasticsearchProjectionHandlerCall(client, msg, token));
             return Task.FromResult(false);
         });
     var handler3 = new ElasticsearchProjectionHandler(
         typeof(MatchMessage1),
         (client, msg, token) =>
         {
             _calls.Add(new ElasticsearchProjectionHandlerCall(client, msg, token));
             return Task.FromResult(false);
         });
     var handler4 = new ElasticsearchProjectionHandler(
         typeof(MatchMessage2),
         (client, msg, token) =>
         {
             _calls.Add(new ElasticsearchProjectionHandlerCall(client, msg, token));
             return Task.FromResult(false);
         });
     _sut = SutFactory(new[] { handler1, handler2, handler3, handler4 });
 }