コード例 #1
0
 public void it_can_be_created()
 {
     var coreProjection        = new FakeCoreProjection();
     var stateCache            = new PartitionStateCache();
     var bus                   = new InMemoryBus("test");
     var fakeCheckpointManager = new specification_with_multi_phase_core_projection.FakeCheckpointManager(bus, Guid.NewGuid());
     var it = new WriteQueryResultProjectionProcessingPhase(
         1, "result-stream", coreProjection, stateCache,
         fakeCheckpointManager, fakeCheckpointManager);
 }
コード例 #2
0
 public void SetUp()
 {
     _stateCache        = GivenStateCache();
     _publisher         = new InMemoryBus("test");
     _coreProjection    = new FakeCoreProjection();
     _checkpointManager = new specification_with_multi_phase_core_projection.FakeCheckpointManager(
         _publisher, Guid.NewGuid());
     _resultStreamName = "result-stream";
     _phase            = new WriteQueryResultProjectionProcessingPhase(
         1, _resultStreamName, _coreProjection, _stateCache, _checkpointManager, _checkpointManager);
     When();
 }
 protected new virtual void Given()
 {
     _projectionStateUpdatesStreamId = "$projections-projection-state";
     _projectionCorrelationId = Guid.NewGuid();
     _projection = new FakeCoreProjection();
     _projectionMode = ProjectionMode.Persistent;
     _checkpointHandledThreshold = 2;
     _checkpointUnhandledBytesThreshold = 5;
     _pendingEventsThreshold = 5;
     _maxWriteBatchLength = 5;
     _publishStateUpdates = true;
     _emitEventEnabled = true;
     _checkpointsEnabled = true;
     NoStream(_projectionStateUpdatesStreamId);
 }
 protected new virtual void Given()
 {
     _projectionStateUpdatesStreamId = "$projections-projection-state";
     _projectionCorrelationId        = Guid.NewGuid();
     _projection                        = new FakeCoreProjection();
     _projectionMode                    = ProjectionMode.Persistent;
     _checkpointHandledThreshold        = 2;
     _checkpointUnhandledBytesThreshold = 5;
     _pendingEventsThreshold            = 5;
     _maxWriteBatchLength               = 5;
     _publishStateUpdates               = true;
     _emitEventEnabled                  = true;
     _checkpointsEnabled                = true;
     NoStream(_projectionStateUpdatesStreamId);
 }
コード例 #5
0
            public void it_can_be_created()
            {
                var coreProjection        = new FakeCoreProjection();
                var stateCache            = new PartitionStateCache();
                var bus                   = new InMemoryBus("test");
                var fakeCheckpointManager =
                    new specification_with_multi_phase_core_projection <TLogFormat, TStreamId> .FakeCheckpointManager(bus, Guid.NewGuid());

                var fakeEmittedStreamsTracker =
                    new specification_with_multi_phase_core_projection <TLogFormat, TStreamId> .FakeEmittedStreamsTracker();

                TestHelper.Consume(
                    new WriteQueryResultProjectionProcessingPhase(
                        bus,
                        1,
                        "result-stream",
                        coreProjection,
                        stateCache,
                        fakeCheckpointManager,
                        fakeCheckpointManager,
                        fakeEmittedStreamsTracker));
            }