Akka.Streams.Tests.Dsl.SubstreamSubscriptionTimeoutSpec.GroupBy_and_SplitWhen_must_timeout_and_stop_groupBy_parent_actor_if_none_of_the_substreams_are_actually_consumed C# (CSharp) Method

GroupBy_and_SplitWhen_must_timeout_and_stop_groupBy_parent_actor_if_none_of_the_substreams_are_actually_consumed() private method

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


                var downstreamSubscription = subscriber.ExpectSubscription();
                downstreamSubscription.Request(100);

                publisherProbe.SendNext(1);
                publisherProbe.SendNext(2);
                publisherProbe.SendNext(3);
                publisherProbe.SendComplete();

                subscriber.ExpectNext();
                subscriber.ExpectNext();
            }, Materializer);
        }