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();
        }
Example #2
0
 protected override void When()
 {
     _manager = new MultiStreamMultiOutputCheckpointManager(
         _bus, _projectionCorrelationId, _projectionVersion, null, _readDispatcher, _writeDispatcher, _config,
         "projection", new MultiStreamPositionTagger(_streams), _namingBuilder, _resultEmitter,
         _checkpointsEnabled);
 }