Example #1
0
        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();
        }
Example #2
0
        public async Task Rehydrade(Func <SourceQualifiedImageId, ISavedImage> fetchSavedImages)
        {
            await _imageQueue.Rehydrade(fetchSavedImages);

            _queueChanges.OnNext(new ImageQueueChangedEvent());
        }