Akka.Streams.Tests.Dsl.LastSinkSpec.A_Flow_with_Sink_LastOption_must_yield_default_for_empty_stream C# (CSharp) Method

A_Flow_with_Sink_LastOption_must_yield_default_for_empty_stream() private method

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