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)); }
public void invalid_from_tag_throws_argument_exception() { var edp = new MultiStreamReaderEventDistributionPoint( _bus, Guid.NewGuid(), _abStreams, new Dictionary <string, int> { { "a", 1 }, { "c", 2 } }, false); }
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); }
public void empty_streams_throws_argument_exception() { var edp = new MultiStreamReaderEventDistributionPoint(_bus, Guid.NewGuid(), new string[0], _ab12Tag, false); }
public void empty_distribution_point_id_throws_argument_exception() { var edp = new MultiStreamReaderEventDistributionPoint(_bus, Guid.Empty, _abStreams, _ab12Tag, false); }
public void null_publisher_throws_argument_null_exception() { var edp = new MultiStreamReaderEventDistributionPoint(null, Guid.NewGuid(), _abStreams, _ab12Tag, false); }
public void it_can_be_created() { var edp = new MultiStreamReaderEventDistributionPoint(_bus, Guid.NewGuid(), _abStreams, _ab12Tag, false); }