public void BatchWriterStage_must_write_batches_sequentially()
        {
            var b1 = new[] { "a", "b", "c" }.Select(p => new DurableEvent(p)).ToImmutableArray();
            var b2 = new[] { "d", "e", "f" }.Select(p => new DurableEvent(p)).ToImmutableArray();
            var b3 = new[] { "g", "h", "i" }.Select(p => new DurableEvent(p)).ToImmutableArray();

            snk.Request(3);
            src.SendNext(b1);
            src.SendNext(b2);
            src.SendNext(b3);
            snk.ExpectNext().Should().BeEquivalentTo(b1);
            snk.ExpectNext().Should().BeEquivalentTo(b2);
            snk.ExpectNext().Should().BeEquivalentTo(b3);
        }
Beispiel #2
0
        private EventEnvelope ExpectEnvelope(TestSubscriber.Probe <EventEnvelope> probe, string persistenceId, long sequenceNr, string @event)
        {
            var envelope = probe.ExpectNext <EventEnvelope>(e => true);

            envelope.PersistenceId.Should().Be(persistenceId);
            envelope.SequenceNr.Should().Be(sequenceNr);
            envelope.Event.Should().Be(@event);
            return(envelope);
        }