public void Throttle_for_single_cost_elements_must_emit_single_element_per_tick()
{
this.AssertAllStagesStopped(() =>
{
var upstream = TestPublisher.CreateProbe<int>(this);
var downstream = TestSubscriber.CreateProbe<int>(this);
Source.FromPublisher(upstream)
.Throttle(1, TimeSpan.FromMilliseconds(300), 0, ThrottleMode.Shaping)
.RunWith(Sink.FromSubscriber(downstream), Materializer);
downstream.Request(2);
upstream.SendNext(1);
downstream.ExpectNoMsg(TimeSpan.FromMilliseconds(150));
downstream.ExpectNext(1);
upstream.SendNext(2);
downstream.ExpectNoMsg(TimeSpan.FromMilliseconds(150));
downstream.ExpectNext(2);
upstream.SendComplete();
downstream.ExpectComplete();
}, Materializer);
}