Ejemplo n.º 1
0
            public void SetUp()
            {
                _stateCache        = GivenStateCache();
                _publisher         = new InMemoryBus("test");
                _coreProjection    = new FakeCoreProjection();
                _checkpointManager = new specification_with_multi_phase_core_projection <TLogFormat, TStreamId> .FakeCheckpointManager(
                    _publisher, Guid.NewGuid());

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

                _resultStreamName = "result-stream";
                _phase            = new WriteQueryResultProjectionProcessingPhase(
                    _publisher,
                    1,
                    _resultStreamName,
                    _coreProjection,
                    _stateCache,
                    _checkpointManager,
                    _checkpointManager,
                    _emittedStreamsTracker);
                When();
            }
Ejemplo n.º 2
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));
            }