public void TestFixtureSetUp()
        {
            _ioDispatcher      = new IODispatcher(_bus, new PublishEnvelope(_bus), true);
            _projectionVersion = new ProjectionVersion(3, 1, 2);
            _projectionConfig  = new ProjectionConfig(SystemAccounts.System, 10, 1000, 1000, 10, true, true, true,
                                                      false,
                                                      false, 5000, 10);
            _positionTagger = new MultiStreamPositionTagger(3, _streams);
            _positionTagger.AdjustTag(CheckpointTag.FromStreamPositions(3,
                                                                        new Dictionary <string, long> {
                { "a", 0 }, { "b", 0 }, { "c", 0 }
            }));
            _namingBuilder = ProjectionNamesBuilder.CreateForTest("projection");

            IODispatcherTestHelpers.SubscribeIODispatcher(_ioDispatcher, _bus);
            _bus.Subscribe <ClientMessage.ReadStreamEventsBackward>(this);

            _coreProjectionCheckpointWriter = new CoreProjectionCheckpointWriter(
                _namingBuilder.MakeCheckpointStreamName(), _ioDispatcher,
                _projectionVersion, _projectionName);

            _checkpointManager = new MultiStreamMultiOutputCheckpointManager(_bus, _projectionId, _projectionVersion,
                                                                             SystemAccounts.System,
                                                                             _ioDispatcher, _projectionConfig, _projectionName, _positionTagger, _namingBuilder, true, true, false,
                                                                             _coreProjectionCheckpointWriter);

            When();
        }
 public virtual void TestFixtureSetUp()
 {
     _ioDispatcher = new IODispatcher(_bus, new PublishEnvelope(_bus));
     IODispatcherTestHelpers.SubscribeIODispatcher(_ioDispatcher, _bus);
     _bus.Subscribe <ClientMessage.ReadStreamEventsForward>(this);
     _bus.Subscribe <ClientMessage.ReadStreamEventsBackward>(this);
     _bus.Subscribe <TimerMessage.Schedule>(this);
 }
 public void TestFixtureSetUp()
 {
     _ioDispatcher = new IODispatcher(_bus, new PublishEnvelope(_bus));
     IODispatcherTestHelpers.SubscribeIODispatcher(_ioDispatcher, _bus);
     _bus.Subscribe <ClientMessage.ReadStreamEventsBackward>(this);
     _projectionVersion = new ProjectionVersion(1, 2, 3);
     _reader            = new CoreProjectionCheckpointReader(_bus, _projectionId, _ioDispatcher, _projectionCheckpointStreamId, _projectionVersion, true);
     When();
 }
Ejemplo n.º 4
0
        public virtual void TestFixtureSetUp()
        {
            var _queue = QueuedHandler.CreateQueuedHandler(_bus, "TestQueuedHandler", new QueueStatsManager());

            _ioDispatcher = new IODispatcher(_bus, new PublishEnvelope(_queue));
            IODispatcherTestHelpers.SubscribeIODispatcher(_ioDispatcher, _bus);
            _bus.Subscribe <ClientMessage.ReadStreamEventsForward>(this);
            _bus.Subscribe <ClientMessage.ReadStreamEventsBackward>(this);
            _bus.Subscribe <TimerMessage.Schedule>(this);
            _queue.Start();
        }
        protected virtual void TestFixtureSetUp()
        {
            _streamId = "$projection-$" + _masterProjectionId.ToString("N");

            _bus = InMemoryBus.CreateTest();
            _bus.Subscribe <ClientMessage.WriteEvents>(this);
            _bus.Subscribe <ClientMessage.ReadStreamEventsForward>(this);

            _ioDispatcher = new IODispatcher(_bus, new PublishEnvelope(_bus));
            IODispatcherTestHelpers.SubscribeIODispatcher(_ioDispatcher, _bus);

            _reader = new MasterCoreProjectionResponseReader(_bus, _ioDispatcher, _workerId, _masterProjectionId);
        }
Ejemplo n.º 6
0
        protected virtual void SetUp()
        {
            _ioDispatcher           = new IODispatcher(_bus, new PublishEnvelope(_bus), true);
            _projectionNamesBuilder = ProjectionNamesBuilder.CreateForTest(_projectionName);
            _checkpointName         = _projectionNamesBuilder.GetEmittedStreamsCheckpointName();

            _deleter = new EmittedStreamsDeleter(_ioDispatcher,
                                                 _projectionNamesBuilder.GetEmittedStreamsName(),
                                                 _checkpointName);

            IODispatcherTestHelpers.SubscribeIODispatcher(_ioDispatcher, _bus);

            _bus.Subscribe <ClientMessage.ReadStreamEventsForward>(this);
            _bus.Subscribe <ClientMessage.ReadStreamEventsBackward>(this);
            _bus.Subscribe <ClientMessage.DeleteStream>(this);

            When();
        }