예제 #1
0
        public async void Continue_executing_scheduled_searches_if_retry_succeeds()
        {
            // arrange
            await TopicCreated();

            RetriesScheduled("facebook");

            // see that timer was registered
            IsTrue(() => Timers.Count() == 1);

            // return something
            facebook
            .ExpectQuery <Search>()
            .Return(122);

            // act
            await topic.RetrySearch("facebook");

            // see that timer was registered
            IsFalse(() => Timers.Any(), "Should unregister retry timer");

            /* now, check regular searching works as expected  #1# */

            // arrange
            facebook.Reset();

            // act
            await ReceiveReminder("facebook");

            // assert sent search query
            IsTrue(() => facebook.Queries().Count() == 1);
            IsTrue(() => facebook.FirstQuery <Search>().Subject == subject);
        }