Author: ssteiner Date: Tue Jul 18 09:17:38 2017 New Revision: 1802257 URL: http://svn.apache.org/viewvc?rev=1802257&view=rev Log: Cleanup test
Modified: xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/StructureTreeMergerTestCase.java Modified: xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/StructureTreeMergerTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/StructureTreeMergerTestCase.java?rev=1802257&r1=1802256&r2=1802257&view=diff ============================================================================== --- xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/StructureTreeMergerTestCase.java (original) +++ xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/StructureTreeMergerTestCase.java Tue Jul 18 09:17:38 2017 @@ -23,6 +23,7 @@ import java.io.IOException; import java.util.HashMap; import java.util.List; +import org.junit.Before; import org.junit.Test; import org.apache.pdfbox.cos.COSArray; @@ -60,7 +61,6 @@ public class StructureTreeMergerTestCase @Test public void testCopyStructure() throws IOException { - setUp(); PDDocument doc = PDDocument.load(new File(LINK)); PDPage srcPage = doc.getPage(0); PageParentTreeFinder finder = new PageParentTreeFinder(srcPage); @@ -80,7 +80,6 @@ public class StructureTreeMergerTestCase @Test public void testNullEntriesInParentTree() throws IOException { - setUp(); PDDocument doc = PDDocument.load(new File(LINK)); PDPage srcPage = doc.getPage(0); PageParentTreeFinder finder = new PageParentTreeFinder(srcPage); @@ -98,7 +97,6 @@ public class StructureTreeMergerTestCase @Test public void testOBJRCorrectPosition() throws IOException { - setUp(); PDDocument doc = PDDocument.load(new File(MissingOBJR)); PDPage srcPage = doc.getPage(0); PageParentTreeFinder finder = new PageParentTreeFinder(srcPage); @@ -156,7 +154,8 @@ public class StructureTreeMergerTestCase } } - private void setUp() { + @Before + public void setUp() { Rectangle2D r = new Rectangle2D.Double(); pdfDoc = new PDFDocument(" "); pdfPage = new PDFPage(new PDFResources(pdfDoc), 0, r, r, r, r); @@ -174,7 +173,6 @@ public class StructureTreeMergerTestCase @Test public void testCheckNullCOSObject() throws IOException { - setUp(); PDDocument doc = PDDocument.load(new File(BrokenLink)); PDPage srcPage = doc.getPage(0); PageParentTreeFinder finder = new PageParentTreeFinder(srcPage); @@ -202,7 +200,6 @@ public class StructureTreeMergerTestCase public void testDirectDescedants() throws IOException { PDFStructElem elem = new PDFStructElem(); elem.setObjectNumber(100); - setUp(); adapter = new PDFBoxAdapter(pdfPage, new HashMap(), new HashMap<Integer, PDFArray>()); PDFLogicalStructureHandler handler = setUpPDFLogicalStructureHandler(); PDPage srcPage = new PDPage(); --------------------------------------------------------------------- To unsubscribe, e-mail: fop-commits-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-commits-h...@xmlgraphics.apache.org