public void ImageGetDocumentInfoFromUrlReturnsInvalidUrlTest()
        {
            var request = new ImageGetDocumentInfoFromUrlRequest
            {
                Url               = "invalid-url",
                FileName          = null,
                Password          = null,
                ExtractText       = null,
                RenderComments    = null,
                RenderHiddenPages = null,
                Folder            = null,
                Storage           = null
            };

            var ex = Assert.Throws <ApiException>(() =>
            {
                ViewerApi.ImageGetDocumentInfoFromUrl(request);
            });

            Assert.AreEqual("Can't parse specified URL 'invalid-url'.", ex.Message);
        }
        public void ImageGetDocumentInfoFromUrlTest()
        {
            var file = TestFiles.FromUrlOnePageDocx;

            var request = new ImageGetDocumentInfoFromUrlRequest
            {
                Url               = file.Url,
                FileName          = file.FileName,
                Password          = null,
                ExtractText       = null,
                RenderComments    = null,
                RenderHiddenPages = null,
                Folder            = FromUrlFolder,
                Storage           = null
            };

            var response = ViewerApi.ImageGetDocumentInfoFromUrl(request);

            Assert.AreEqual("one-page.docx", response.FileName);
            Assert.AreEqual(".docx", response.Extension);
            Assert.AreEqual(1, response.Pages.Count);
        }