Akka.Streams.Tests.Dsl.FlowForeachSpec.A_Foreach_must_complete_the_future_for_an_empty_stream C# (CSharp) Method

A_Foreach_must_complete_the_future_for_an_empty_stream() private method

        public void A_Foreach_must_complete_the_future_for_an_empty_stream()
        {
            this.AssertAllStagesStopped(() =>
            {
                Source.Empty<int>().RunForeach(i => TestActor.Tell(i), Materializer).ContinueWith(
                    task =>
                    {
                        if (task.IsCompleted && task.Exception == null)
                            TestActor.Tell("done");
                    });
                ExpectMsg("done");
            }, Materializer);
        }