Akka.Streams.Tests.Dsl.FlowThrottleSpec.Throttle_for_various_cost_elements_must_handle_rate_calculation_function_exception C# (CSharp) 메소드

Throttle_for_various_cost_elements_must_handle_rate_calculation_function_exception() 개인적인 메소드

        public void Throttle_for_various_cost_elements_must_handle_rate_calculation_function_exception()
        {
            this.AssertAllStagesStopped(() =>
            {
                var ex = new SystemException();
                Source.From(Enumerable.Range(1, 5))
                    .Throttle(2, TimeSpan.FromMilliseconds(200), 0, _ => { throw ex; }, ThrottleMode.Shaping)
                    .Throttle(1, TimeSpan.FromMilliseconds(100), 5, ThrottleMode.Enforcing)
                    .RunWith(this.SinkProbe<int>(), Materializer)
                    .Request(5)
                    .ExpectError().Should().Be(ex);
            }, Materializer);
        }
    }
FlowThrottleSpec