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

A_Foreach_must_call_the_procedure_for_each_element() private method

        public void A_Foreach_must_call_the_procedure_for_each_element()
        {
            this.AssertAllStagesStopped(() =>
            {
                Source.From(Enumerable.Range(1, 3)).RunForeach(i => TestActor.Tell(i), Materializer).ContinueWith(
                    task =>
                    {
                        if(task.IsCompleted && task.Exception == null)
                            TestActor.Tell("done");
                    });

                ExpectMsg(1);
                ExpectMsg(2);
                ExpectMsg(3);
                ExpectMsg("done");
            }, Materializer);
        }