Akka.Streams.Tests.Dsl.FlowThrottleSpec.Throttle_for_various_cost_elements_must_throw_exception_when_exceeding_throughtput_in_enforced_mode C# (CSharp) Метод

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

        public void Throttle_for_various_cost_elements_must_throw_exception_when_exceeding_throughtput_in_enforced_mode()
        {
            this.AssertAllStagesStopped(() =>
            {
                var t =
                    Source.From(Enumerable.Range(1, 5))
                        .Throttle(2, TimeSpan.FromMilliseconds(200), 5, x => x, ThrottleMode.Enforcing)
                        .RunWith(Sink.Ignore<int>(), Materializer);
                t.Invoking(task => task.Wait(TimeSpan.FromSeconds(2))).ShouldThrow<OverflowException>();
            }, Materializer);
        }
FlowThrottleSpec