Akka.Streams.Tests.Dsl.BidiFlowSpec.A_BidiFlow_must_materialize_its_value C# (CSharp) Method

A_BidiFlow_must_materialize_its_value() private method

private A_BidiFlow_must_materialize_its_value ( ) : void
return void
        public void A_BidiFlow_must_materialize_its_value()
        {
            var f = RunnableGraph.FromGraph(GraphDsl.Create(BidiMaterialized(), (b, bidi) =>
            {
                var flow1 = b.Add(Flow.Create<string>().Select(int.Parse).MapMaterializedValue(_ => Task.FromResult(0)));
                var flow2 =
                    b.Add(
                        Flow.Create<long>()
                            .Select(x => ByteString.FromString($"Hello {x}"))
                            .MapMaterializedValue(_ => Task.FromResult(0)));
                
                b.AddEdge(flow1.Outlet, bidi.Inlet1);
                b.AddEdge(bidi.Outlet2, flow1.Inlet);

                b.AddEdge(bidi.Outlet1, flow2.Inlet);
                b.AddEdge(flow2.Outlet, bidi.Inlet2);

                return ClosedShape.Instance;
            })).Run(Materializer);

            f.Wait(TimeSpan.FromSeconds(3)).Should().BeTrue();
            f.Result.Should().Be(42);
        }