Akka.Streams.Tests.Dsl.FlowThrottleSpec.Throttle_for_various_cost_elements_must_cancel_when_downstream_cancels C# (CSharp) Method

Throttle_for_various_cost_elements_must_cancel_when_downstream_cancels() private method

        public void Throttle_for_various_cost_elements_must_cancel_when_downstream_cancels()
        {
            this.AssertAllStagesStopped(() =>
            {
                var downstream = TestSubscriber.CreateProbe<int>(this);
                Source.From(Enumerable.Range(1, 10))
                    .Throttle(2, TimeSpan.FromMilliseconds(200), 0, x => x, ThrottleMode.Shaping)
                    .RunWith(Sink.FromSubscriber(downstream), Materializer);
                downstream.Cancel();
            }, Materializer);
        }
FlowThrottleSpec