Akka.Streams.Tests.Dsl.GraphBroadcastSpec.A_Broadcast_must_produce_to_downstream_even_though_other_cancels C# (CSharp) Méthode

A_Broadcast_must_produce_to_downstream_even_though_other_cancels() private méthode

        public void A_Broadcast_must_produce_to_downstream_even_though_other_cancels()
        {
            this.AssertAllStagesStopped(() =>
            {
                var c1 = TestSubscriber.CreateManualProbe<int>(this);
                var c2 = TestSubscriber.CreateManualProbe<int>(this);
                RunnableGraph.FromGraph(GraphDsl.Create(b =>
                {
                    var broadcast = b.Add(new Broadcast<int>(2));
                    var source = Source.From(Enumerable.Range(1, 3));
                    b.From(source).To(broadcast.In);
                    b.From(broadcast.Out(0))
                        .Via(Flow.Create<int>().Named("identity-a"))
                        .To(Sink.FromSubscriber(c1));
                    b.From(broadcast.Out(1))
                        .Via(Flow.Create<int>().Named("identity-b"))
                        .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);
        }