Beispiel #1
0
 public PersistingImageQueue(IPersistence persistence,
                             IImageQueueSerializer imageQueueSerializer,
                             IImageQueue queue,
                             ILogger logger)
 {
     _persistence          = persistence;
     _imageQueueSerializer = imageQueueSerializer;
     _queue  = queue;
     _logger = logger.ForContext <PersistingImageQueue>();
 }
Beispiel #2
0
 public PersistingImageQueueTests()
 {
     _enqueuedImageIds = new[]
     {
         CreateImageId("1"),
         CreateImageId("2"),
         CreateImageId("3")
     };
     _innerQueue = A.Fake <IImageQueue>();
     A.CallTo(() => _innerQueue.QueuedImageIds).Returns(_enqueuedImageIds);
     _persistence = A.Fake <IPersistence>();
     _serializer  = A.Fake <IImageQueueSerializer>();
     A.CallTo(() => _serializer.Serialize(A <IEnumerable <SourceQualifiedImageId> > .That.IsSameSequenceAs(_enqueuedImageIds))).Returns(EnqueuedImageIdsJson);
     _sut = new PersistingImageQueue(_persistence, _serializer, _innerQueue, A.Fake <ILogger>());
 }