Exemple #1
0
        public virtual void RetrieveImageWrongPathTest()
        {
            String           fileName         = "/itextpdf.com/itis.jpg";
            ResourceResolver resourceResolver = new ResourceResolver(baseUri);
            PdfImageXObject  image            = resourceResolver.RetrieveImage(fileName);

            Assert.Null(image);
        }
Exemple #2
0
        public virtual void RetrieveImageTest()
        {
            String           fileName         = "resourceResolverTest.png";
            ResourceResolver resourceResolver = new ResourceResolver(baseUri);
            PdfImageXObject  image            = resourceResolver.RetrieveImage(fileName);

            NUnit.Framework.Assert.NotNull(image);
            NUnit.Framework.Assert.True(image.IdentifyImageFileExtension().EqualsIgnoreCase("png"));
        }
Exemple #3
0
        public virtual void RetrieveImagePathWithSpacesTest()
        {
            String           fileName         = "retrieveImagePathWithSpaces.jpg";
            ResourceResolver resourceResolver = new ResourceResolver(baseUri + "path with spaces/");
            PdfImageXObject  image            = resourceResolver.RetrieveImage(fileName);

            Assert.NotNull(image);
            Assert.IsTrue(image.IdentifyImageFileExtension().EqualsIgnoreCase("jpg"));
        }
Exemple #4
0
        public virtual void RetrieveImageRightPathTest()
        {
            String           fileName         = "itextpdf.com/itis.jpg";
            ResourceResolver resourceResolver = new ResourceResolver(baseUri);
            PdfImageXObject  image            = resourceResolver.RetrieveImage(fileName);

            Assert.NotNull(image);
            Assert.IsTrue(image.IdentifyImageFileExtension().EqualsIgnoreCase("jpg"));
        }