Exemple #1
0
        public async Task TestGetAllImagesFromAlbum()
        {
            var imgurClient   = AuthenticationHelpers.CreateClientAuthenticatedImgurClient();
            var albumEndpoint = new AlbumEndpoint(imgurClient);
            var albumDetails  = await albumEndpoint.GetAlbumDetailsAsync("IPPAY");

            var albumImages = await albumEndpoint.GetAllImagesFromAlbumAsync(albumDetails.Data.Id);

            // Assert the Reponse
            Assert.IsNotNull(albumImages.Data);
            Assert.AreEqual(albumImages.Success, true);
            Assert.AreEqual(albumImages.Status, HttpStatusCode.OK);

            // Asset the Data
            Assert.AreEqual(albumImages.Data.Length, albumDetails.Data.ImagesCount);
        }