public void Expand_musst_pass_through_elements_unchanged_when_there_is_no_rate_differenc()
{
// Shadow the fuzzed materializer (see the ordering guarantee needed by the for loop below).
var materializer = ActorMaterializer.Create(Sys, Settings.WithFuzzingMode(false));
var publisher = TestPublisher.CreateProbe<int>(this);
var subscriber = TestSubscriber.CreateProbe<int>(this);
// Simply repeat the last element as an extrapolation step
Source.FromPublisher(publisher)
.Expand(i => Enumerable.Repeat(i, 200).GetEnumerator())
.To(Sink.FromSubscriber(subscriber))
.Run(materializer);
for (var i = 1; i <= 100; i++)
{
// Order is important here: If the request comes first it will be extrapolated!
publisher.SendNext(i);
subscriber.RequestNext(i);
}
subscriber.Cancel();
}