Akka.Streams.Tests.Dsl.FlowGroupBySpec.GroupBy_must_pass_along_early_cancellation C# (CSharp) Method

GroupBy_must_pass_along_early_cancellation() private method

private GroupBy_must_pass_along_early_cancellation ( ) : void
return void
        public void GroupBy_must_pass_along_early_cancellation()
        {
            this.AssertAllStagesStopped(() =>
            {
                var up = TestPublisher.CreateManualProbe<int>(this);
                var down = TestSubscriber.CreateManualProbe<Tuple<int, Source<int, NotUsed>>>(this);

                var flowSubscriber =
                    Source.AsSubscriber<int>()
                        .GroupBy(2, x => x%2)
                        .Lift(x => x%2)
                        .To(Sink.FromSubscriber(down)).Run(Materializer);
                
                var downstream = down.ExpectSubscription();
                downstream.Cancel();
                up.Subscribe(flowSubscriber);
                var upSub = up.ExpectSubscription();
                upSub.ExpectCancellation();
            }, Materializer);
        }