示例#1
0
 private Wallpaper ToWallpaper(WallpaperResponse response)
 {
     return(new Wallpaper
     {
         FullImageUrl = response.Path,
         SmallThumbnailUrl = response.Thumbs.Small
     });
 }
        private void SetSimpleWallpaperResponse()
        {
            IEnumerable <WallpaperResponse> wallpapers = new WallpaperResponse[] {
                new WallpaperResponse
                {
                    Path   = "FULL WALLPAPER URL 1",
                    Thumbs = new Thumbnails
                    {
                        Small = "SMALL THUMBNAIL URL 1"
                    }
                },
                new WallpaperResponse
                {
                    Path   = "FULL WALLPAPER URL 2",
                    Thumbs = new Thumbnails
                    {
                        Small = "SMALL THUMBNAIL URL 2"
                    }
                }
            };

            _clientMock.Setup(c => c.GetLatestWallpapersAsync(It.IsAny <QueryOptions>(), false)).Returns(Task.FromResult(wallpapers));
        }