public void Rehydrate_ImageQueueChangesEventFired() { var fetchSavedImages = A.Fake <Func <SourceQualifiedImageId, ISavedImage> >(); _testScheduler.ScheduleAsync(TimeSpan.FromTicks(5), (s, t) => _sut.Rehydrade(fetchSavedImages)); ITestableObserver <ImageQueueChangedEvent> imageQueueChanges = _testScheduler.Start(() => _sut.ImageQueueChanges, 0, 0, 100); imageQueueChanges.Messages.Should().HaveCount(1); A.CallTo(() => _innerQueue.Rehydrade(fetchSavedImages)).MustHaveHappened(); }
public async Task Rehydrade(Func <SourceQualifiedImageId, ISavedImage> fetchSavedImages) { await _imageQueue.Rehydrade(fetchSavedImages); _queueChanges.OnNext(new ImageQueueChangedEvent()); }