public async Task TestBookThumbPictureResult()
        {
            //get book no 123
            var book = await NHentaiClient.GetBookAsync(123);

            //Check this book is
            Assert.AreEqual(635, book.MediaId);

            //https://t.nhentai.net/galleries/635/thumb.jpg
            var result = await NHentaiClient.GetBookThumbPictureAsync(book);

            //make sure downloaded image
            Assert.AreEqual(true, result.Length > 0);
        }
示例#2
0
        public async Task TestBookThumbPictureResult()
        {
            // Get book no 123
            var book = await NHentaiClient.GetBookAsync(123);

            // Check this book is right media number
            Assert.AreEqual(635, book.MediaId);

            // Check url
            var imageUrl = NHentaiClient.GetBookThumbUrl(book);

            Assert.AreEqual(imageUrl, "https://t.nhentai.net/galleries/635/thumb.jpg");

            // Make sure image is downloaded
            var result = await NHentaiClient.GetBookThumbPictureAsync(book);

            Assert.AreEqual(true, result.Length > 0);
        }