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

A_FLow_with_a_Sink_HeadOption_must_yield_default_for_empty_stream() private method

        public void A_FLow_with_a_Sink_HeadOption_must_yield_default_for_empty_stream()
        {
            this.AssertAllStagesStopped(() =>
            {
                var task = Source.Empty<int>().RunWith(Sink.FirstOrDefault<int>(), Materializer);
                task.Wait(TimeSpan.FromSeconds(1)).Should().BeTrue();
                task.Result.Should().Be(0);
            }, Materializer);
        }
    }