public async void When_created() { await TopicCreated(); IsTrue(() => Reminders.Count() == schedule.Count, "Should schedule recurrent search reminder per each api"); AssertReminderScheduled(facebook); AssertReminderScheduled(twitter); }
public async void Disables_scheduled_searches_after_3_consecutive_failed_retries() { // arrange await TopicCreated(); RetriesScheduled("facebook"); // throw facebook .ExpectQuery <Search>() .Throw(new ApiUnavailableException("facebook.com")); // act for (var i = 0; i < MaxRetries; i++) { await topic.RetrySearch("facebook"); } // assert IsTrue(() => Reminders.Count() == 1); AssertReminderScheduled(twitter); }