Akka.Streams.Tests.Dsl.FlowSumSpec.A_Sum_must_complete_task_with_failure_when_reducing_function_throws C# (CSharp) Метод

A_Sum_must_complete_task_with_failure_when_reducing_function_throws() приватный Метод

private A_Sum_must_complete_task_with_failure_when_reducing_function_throws ( ) : void
Результат void
        public void A_Sum_must_complete_task_with_failure_when_reducing_function_throws()
        {
            this.AssertAllStagesStopped(() =>
            {
                var error = new TestException("test");
                var task = InputSource.RunSum((x, y) =>
                {
                    if (x > 50)
                        throw error;
                    return x + y;
                }, Materializer);

                task.Invoking(t => t.Wait(TimeSpan.FromSeconds(3))).ShouldThrow<TestException>().WithMessage("test");
            }, Materializer);
        }
    }