public void A_Unzip_must_produce_to_right_downstream_even_though_left_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();
sub1.Cancel();
sub2.Request(3);
c2.ExpectNext("a", "b", "c");
c2.ExpectComplete();
}, Materializer);
}