public NewsAggregatorTests()
        {
            var registry            = new Mock <INewsSourceRegistry <NewsSource> >();
            var aggregationStrategy = new Mock <ICrossSourceAggregationStrategy>();

            aggregationStrategy.Setup(x => x.Aggregate(It.IsAny <IEnumerable <INewsSource> >()))
            .Returns(Helper.GetNews(commaSeparatedNews));

            var pagingStrategy = new Mock <IPagingStrategy>();

            pagingStrategy.Setup(x => x.Arrange(It.IsAny <IEnumerable <News> >()))
            .Returns(Helper.GetNews(commaSeparatedNews));
            aggregator = new PagedNewsAggregator(registry.Object, aggregationStrategy.Object, pagingStrategy.Object);
        }
Beispiel #2
0
 public NewsController(IPagedNewsAggregator newsAggregator)
 {
     _newsAggregator = newsAggregator;
 }