Example #1
0
        public void ValidPdf()
        {
            var rotativaDemoUrl = ConfigurationManager.AppSettings["RotativaDemoUrl"];
            var pdfLink         = rotativaDemoUrl + "/Home/ScriptJs";

            using (var webClient = new WebClient())
            {
                var pdf       = webClient.DownloadData(new Uri(pdfLink));
                var pdfTester = new PdfTester();
                pdfTester.LoadPdf(pdf);
                Assert.True(pdfTester.PdfIsValid, "it's not a valid pdf");
                Assert.True(pdfTester.PdfContains("whooah"), "it doesn't contain searched text");
            }
        }