pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1749355 - /pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java
Date Mon, 20 Jun 2016 16:11:36 GMT
Author: tilman
Date: Mon Jun 20 16:11:36 2016
New Revision: 1749355

URL: http://svn.apache.org/viewvc?rev=1749355&view=rev
Log:
PDFBOX-2852: remove tests that are duplicate due to removal of non sequential parser

Modified:
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java?rev=1749355&r1=1749354&r2=1749355&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/TestPDDocument.java Mon Jun
20 16:11:36 2016
@@ -107,63 +107,6 @@ public class TestPDDocument extends Test
     }
 
     /**
-     * Test document save/loadNonSeq using a stream.
-     * @throws IOException if something went wrong
-     */
-    public void testSaveLoadNonSeqStream() throws IOException
-    {
-        // Create PDF with one blank page
-        PDDocument document = new PDDocument();
-        document.addPage(new PDPage());
-
-        // Save
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        document.save(baos);
-        document.close();
-
-        // Verify content
-        byte[] pdf = baos.toByteArray();
-        assertTrue(pdf.length > 200);
-        assertEquals("%PDF-1.4", new String(Arrays.copyOfRange(pdf, 0, 8), "UTF-8"));
-        assertEquals("%%EOF\n", new String(Arrays.copyOfRange(pdf, pdf.length - 6, pdf.length),
"UTF-8"));
-
-        // Load
-        PDDocument loadDoc = PDDocument.load(new ByteArrayInputStream(pdf));
-        assertEquals(1, loadDoc.getNumberOfPages());
-        loadDoc.close();
-    }
-
-    /**
-     * Test document save/loadNonSeq using a file.
-     * @throws IOException if something went wrong
-     */
-    public void testSaveLoadNonSeqFile() throws IOException
-    {
-        // Create PDF with one blank page
-        PDDocument document = new PDDocument();
-        document.addPage(new PDPage());
-
-        // Save
-        File targetFile = new File(testResultsDir, "pddocument-saveloadnonseqfile.pdf");
-        document.save(targetFile);
-        document.close();
-
-        // Verify content
-        assertTrue(targetFile.length() > 200);
-        InputStream in = new FileInputStream(targetFile);
-        byte[] pdf = IOUtils.toByteArray(in);
-        in.close();
-        assertTrue(pdf.length > 200);
-        assertEquals("%PDF-1.4", new String(Arrays.copyOfRange(pdf, 0, 8), "UTF-8"));
-        assertEquals("%%EOF\n", new String(Arrays.copyOfRange(pdf, pdf.length - 6, pdf.length),
"UTF-8"));
-
-        // Load
-        PDDocument loadDoc = PDDocument.load(targetFile);
-        assertEquals(1, loadDoc.getNumberOfPages());
-        loadDoc.close();
-    }
-    
-    /**
      * Test get/setVersion.
      * @throws IOException if something went wrong
      */



Mime
View raw message