예제 #1
0
            public void SetUp()
            {
                _store = new EmbeddableDocumentStore
                {
                    RunInMemory   = true,
                    DataDirectory = Path.GetTempPath()
                };
                _store.Initialize();
                _session = _store.OpenAsyncSession();
                _calls   = new List <RavenProjectionHandlerCall>();
                var handler = new RavenProjectionHandler(
                    typeof(MatchMessage1),
                    (session, msg, token) =>
                {
                    _calls.Add(new RavenProjectionHandlerCall(session, msg, token));
                    return(Task.FromResult(false));
                });

                _sut = SutFactory(new[] { handler });
            }
예제 #2
0
 public void SetUp()
 {
     _store = new EmbeddableDocumentStore
     {
         RunInMemory = true,
         DataDirectory = Path.GetTempPath()
     };
     _store.Initialize();
     _session = _store.OpenAsyncSession();
     _calls = new List<RavenProjectionHandlerCall>();
     var handler1 = new RavenProjectionHandler(
         typeof(MatchMessage1),
         (connection, msg, token) =>
         {
             _calls.Add(new RavenProjectionHandlerCall(connection, msg, token));
             return Task.FromResult(false);
         });
     var handler2 = new RavenProjectionHandler(
         typeof(MatchMessage2),
         (connection, msg, token) =>
         {
             _calls.Add(new RavenProjectionHandlerCall(connection, msg, token));
             return Task.FromResult(false);
         });
     var handler3 = new RavenProjectionHandler(
         typeof(MatchMessage1),
         (connection, msg, token) =>
         {
             _calls.Add(new RavenProjectionHandlerCall(connection, msg, token));
             return Task.FromResult(false);
         });
     var handler4 = new RavenProjectionHandler(
         typeof(MatchMessage2),
         (connection, msg, token) =>
         {
             _calls.Add(new RavenProjectionHandlerCall(connection, msg, token));
             return Task.FromResult(false);
         });
     _sut = SutFactory(new[] { handler1, handler2, handler3, handler4 });
 }