示例#1
0
        public List <Album> GetAlbums(int pageNumber, int numberOfObjectsPerPage)
        {
            var imagedata = _dataDownloader.DownloadDataFromUrl(ImagesUrl, _webClient);
            var albumdata = _dataDownloader.DownloadDataFromUrl(AlbumsUrl, _webClient);

            var image = _imageRepo.Consume <ImageJson>(imagedata);
            var album = _imageRepo.Consume <AlbumJson>(albumdata);

            var mergedAlbumCollection = _imageMerger.Merge(image, album).ToList();

            return(Pager.Page(mergedAlbumCollection, pageNumber, numberOfObjectsPerPage).ToList());
        }
示例#2
0
        public void ConsumeImageDataToType()
        {
            var result = _imageRepo.Consume <ImageJson>(_imageData);

            result.FirstOrDefault().ShouldBeOfType <ImageJson>();
        }