Example #1
0
        public void Enqueue_ImageQueueChangesEventFired()
        {
            var savedImages = new[] { A.Dummy <ISavedImage>() };

            _testScheduler.ScheduleAsync(TimeSpan.FromTicks(5), (s, t) => _sut.Enqueue(savedImages));
            ITestableObserver <ImageQueueChangedEvent> imageQueueChanges = _testScheduler.Start(() => _sut.ImageQueueChanges, 0, 0, 100);

            imageQueueChanges.Messages.Should().HaveCount(1);
            A.CallTo(() => _innerQueue.Enqueue(savedImages)).MustHaveHappened();
        }
Example #2
0
        public async Task Enqueue(IEnumerable <ISavedImage> savedImages)
        {
            await _imageQueue.Enqueue(savedImages);

            _queueChanges.OnNext(new ImageQueueChangedEvent());
        }