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);
}