Пример #1
0
        public void When()
        {
            _ab12Tag = new Dictionary <string, int> {
                { "a", 1 }, { "b", 2 }
            };
            _abStreams = new[] { "a", "b" };

            _publishWithCorrelationId      = Guid.NewGuid();
            _distibutionPointCorrelationId = Guid.NewGuid();
            _edp = new MultiStreamReaderEventDistributionPoint(_bus, _distibutionPointCorrelationId, _abStreams, _ab12Tag, false);
            _edp.Resume();
            _firstEventId  = Guid.NewGuid();
            _secondEventId = Guid.NewGuid();
            _edp.Handle(
                new ClientMessage.ReadStreamEventsForwardCompleted(
                    _distibutionPointCorrelationId, "a",
                    new[]
            {
                new EventLinkPair(
                    new EventRecord(
                        1, 50, Guid.NewGuid(), _firstEventId, 50, 0, "a", ExpectedVersion.Any, DateTime.UtcNow,
                        PrepareFlags.SingleWrite | PrepareFlags.TransactionBegin | PrepareFlags.TransactionEnd,
                        "event_type1", new byte[] { 1 }, new byte[] { 2 }), null),
                new EventLinkPair(
                    new EventRecord(
                        2, 100, Guid.NewGuid(), _secondEventId, 100, 0, "a", ExpectedVersion.Any, DateTime.UtcNow,
                        PrepareFlags.SingleWrite | PrepareFlags.TransactionBegin | PrepareFlags.TransactionEnd,
                        "event_type2", new byte[] { 3 }, new byte[] { 4 }), null)
            }, RangeReadResult.Success, 3, 4, false, 200));
        }
Пример #2
0
        public void When()
        {
            _ab12Tag = new Dictionary <string, int> {
                { "a", 1 }, { "b", 2 }
            };
            _abStreams = new[] { "a", "b" };

            _distibutionPointCorrelationId = Guid.NewGuid();
            _edp = new MultiStreamReaderEventDistributionPoint(
                _bus, _distibutionPointCorrelationId, _abStreams, _ab12Tag, false);

            _edp.Resume();
        }
Пример #3
0
 public void it_can_be_resumed()
 {
     _edp.Resume();
 }
Пример #4
0
 public void cannot_be_resumed()
 {
     _edp.Resume();
 }