public Stream( IEventStore store, IEventSerializer serializer, StreamId id, IMetadataContext metadataContext) { _store = store ?? throw new ArgumentNullException(nameof(store)); _serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); Id = id; _metadataContext = metadataContext; }
public JobsHelper(IMetadataContext context, IDownloadToStream downloader, ICustomMetadataReader reader, IBackgroundJobClient client, IPostNotificationSender sender) { _context = context; _downloader = downloader; _reader = reader; _client = client; _sender = sender; }
public EventSourcedRepository( IAggregateStreamIdResolver streamIdResolver, IAggregateFactory <TAggregate, TId> aggregateFactory, IEventStore eventStore, IEventSerializer serializer, IMetadataContext metadataContext = null) { _streamIdResolver = streamIdResolver ?? throw new ArgumentNullException(nameof(streamIdResolver)); _aggregateFactory = aggregateFactory ?? throw new ArgumentNullException(nameof(aggregateFactory)); _serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); _metadataContext = metadataContext ?? NullMetadataContext.Instance; _store = eventStore ?? throw new ArgumentNullException(nameof(eventStore)); }
public void Setup() { _client = Mock.Of <IBackgroundJobClient>(); _context = Mock.Of <IMetadataContext>(); _scheduledImages = Mock.Of <DbSet <ScheduledImage> >(); _postNotificationSender = Mock.Of <IPostNotificationSender>(); var imageMetadataTags = Mock.Of <DbSet <ImageMetadataTag> >(); Mock.Get(_context).Setup(ctx => ctx.ScheduledImages).Returns(_scheduledImages); Mock.Get(_context).Setup(ctx => ctx.ImageMetadataTags).Returns(imageMetadataTags); }
public void Setup() { _context = Mock.Of <IMetadataContext>(); _scheduledImages = Mock.Of <DbSet <ScheduledImage> >(); _downloader = Mock.Of <IDownloadToStream>(); _metadataReader = Mock.Of <ICustomMetadataReader>(); _client = Mock.Of <IBackgroundJobClient>(); _postNotificationSender = Mock.Of <IPostNotificationSender>(); Mock.Get(_scheduledImages).Setup(si => si.Find(It.IsAny <int>())).Returns(new ScheduledImage()); Mock.Get(_context).Setup(c => c.ScheduledImages).Returns(_scheduledImages); Mock.Get(_metadataReader).Setup(m => m.ReadFromStream(It.IsAny <MemoryStream>())).Returns(new List <ImageMetadataTag>()); }
public SnapshotableRepository( IAggregateStreamIdResolver streamIdResolver, ITriggerThresholdResolver thresholdResolver, SnapshotableAggregateFactory <TAggregate, TId> aggregateFactory, IEventStore eventStore, IEventSerializer serializer, ISnapshotStore snapshotStore, IMetadataContext metadataContext = null) { _streamIdResolver = streamIdResolver ?? throw new ArgumentNullException(nameof(streamIdResolver)); _thresholdResolver = thresholdResolver ?? throw new ArgumentNullException(nameof(thresholdResolver)); _aggregateFactory = aggregateFactory ?? throw new ArgumentNullException(nameof(aggregateFactory)); _serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); _metadataContext = metadataContext ?? NullMetadataContext.Instance; _eventStore = eventStore ?? throw new ArgumentNullException(nameof(eventStore)); _snapshotStore = snapshotStore ?? throw new ArgumentException(nameof(snapshotStore)); }
public void Setup() { _context = Mock.Of<IMetadataContext>(); _scheduledImages = Mock.Of<DbSet<ScheduledImage>>(); _downloader = Mock.Of<IDownloadToStream>(); _metadataReader = Mock.Of<ICustomMetadataReader>(); _client = Mock.Of<IBackgroundJobClient>(); _postNotificationSender = Mock.Of<IPostNotificationSender>(); Mock.Get(_scheduledImages).Setup(si => si.Find(It.IsAny<int>())).Returns(new ScheduledImage()); Mock.Get(_context).Setup(c => c.ScheduledImages).Returns(_scheduledImages); Mock.Get(_metadataReader).Setup(m => m.ReadFromStream(It.IsAny<MemoryStream>())).Returns(new List<ImageMetadataTag>()); }
public ScheduledImagesController(IMetadataContext context) { _context = context; }
public MetadataRepository(IMetadataContext context) { _context = context; }
public HomeController(IMetadataContext context) { _context = context; }
public void Setup() { _client = Mock.Of<IBackgroundJobClient>(); _context = Mock.Of<IMetadataContext>(); _scheduledImages = Mock.Of<DbSet<ScheduledImage>>(); _postNotificationSender = Mock.Of<IPostNotificationSender>(); var imageMetadataTags = Mock.Of<DbSet<ImageMetadataTag>>(); Mock.Get(_context).Setup(ctx => ctx.ScheduledImages).Returns(_scheduledImages); Mock.Get(_context).Setup(ctx => ctx.ImageMetadataTags).Returns(imageMetadataTags); }
public SchedulerController(IMetadataContext context, IBackgroundJobClient backgroundJobClient, IPostNotificationSender postNotificationSender) { _context = context; _backgroundJobClient = backgroundJobClient; _postNotificationSender = postNotificationSender; }