public void Should_immediately_fire_several_requests_to_reach_parallelism_level() { DropSynchronizationContext(); strategy.SendAsync(request, sender, Budget.Infinite, replicas, replicas.Length, token); sender.ReceivedCalls().Should().HaveCount(3); }
public void Should_stop_on_first_result_if_its_response_is_accepted() { strategy.SendAsync(request, sender, budget, replicas, replicas.Length, CancellationToken.None).Wait(); sender.ReceivedCalls().Should().HaveCount(1); }
public void Should_immediately_fire_just_one_request() { strategy.SendAsync(request, parameters, sender, Budget.Infinite, replicas, replicas.Length, token); sender.ReceivedCalls().Should().HaveCount(1); }
public void Should_not_make_any_requests_when_time_budget_is_expired() { Send(Budget.Expired); sender.ReceivedCalls().Should().BeEmpty(); }