Akka.Streams.Tests.Dsl.HeadSinkSpec.A_FLow_with_a_Sink_Head_must_yield_the_first_value_when_actively_constructing C# (CSharp) Method

A_FLow_with_a_Sink_Head_must_yield_the_first_value_when_actively_constructing() private method

        public void A_FLow_with_a_Sink_Head_must_yield_the_first_value_when_actively_constructing()
        {
            var p = TestPublisher.CreateManualProbe<int>(this);
            var f = Sink.First<int>();
            var s = Source.AsSubscriber<int>();
            var t = s.ToMaterialized(f, Keep.Both).Run(Materializer);
            var subscriber = t.Item1;
            var future = t.Item2;

            p.Subscribe(subscriber);
            var proc = p.ExpectSubscription();
            proc.ExpectRequest();
            proc.SendNext(42);
            future.Wait(100);
            future.Result.Should().Be(42);
            proc.ExpectCancellation();
        }