public void A_Unzip_must_produce_to_left_downstream_even_though_right_downstream_cancels()
{
this.AssertAllStagesStopped(() =>
{
var c1 = TestSubscriber.CreateManualProbe<int>(this);
var c2 = TestSubscriber.CreateManualProbe<string>(this);
RunnableGraph.FromGraph(GraphDsl.Create(b =>
{
var unzip = b.Add(new UnZip<int, string>());
var source =
Source.From(new[]
{
new KeyValuePair<int, string>(1, "a"),
new KeyValuePair<int, string>(2, "b"),
new KeyValuePair<int, string>(3, "c")
});
b.From(source).To(unzip.In);
b.From(unzip.Out0).To(Sink.FromSubscriber(c1));
b.From(unzip.Out1).To(Sink.FromSubscriber(c2));
return ClosedShape.Instance;
})).Run(Materializer);
var sub1 = c1.ExpectSubscription();
var sub2 = c2.ExpectSubscription();
sub2.Cancel();
sub1.Request(3);
c1.ExpectNext(1, 2, 3);
c1.ExpectComplete();
}, Materializer);
}