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

GroupBy_must_accept_cancellation_of_master_stream_when_not_consume_anything() private method

        public void GroupBy_must_accept_cancellation_of_master_stream_when_not_consume_anything()
        {
            this.AssertAllStagesStopped(() =>
            {
                var publisherProbe = TestPublisher.CreateManualProbe<int>(this);
                var publisher =
                    Source.FromPublisher(publisherProbe)
                        .GroupBy(2, x => x%2)
                        .Lift(x => x%2)
                        .RunWith(Sink.AsPublisher<Tuple<int, Source<int, NotUsed>>>(false), Materializer);
                var subscriber = TestSubscriber.CreateManualProbe<Tuple<int, Source<int, NotUsed>>>(this);
                publisher.Subscribe(subscriber);

                var upstreamSubscription = publisherProbe.ExpectSubscription();
                var downstreamSubscription = subscriber.ExpectSubscription();
                downstreamSubscription.Cancel();
                upstreamSubscription.ExpectCancellation();
            }, Materializer);
        }