org.alfresco.repo.content.transform
Class PdfBoxPdfToImageContentTransformerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.content.transform.AbstractContentTransformerTest
              extended by org.alfresco.repo.content.transform.PdfBoxPdfToImageContentTransformerTest
All Implemented Interfaces:
junit.framework.Test

public class PdfBoxPdfToImageContentTransformerTest
extends AbstractContentTransformerTest

Tests for PdfBoxPdfToImageContentTransformer.

Since:
3.4.2.

Field Summary
 
Fields inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerTest
ctx, mimetypeService, QUICK_CONTENT, serviceRegistry
 
Constructor Summary
PdfBoxPdfToImageContentTransformerTest()
           
 
Method Summary
protected  ContentTransformer getTransformer(java.lang.String sourceMimetype, java.lang.String targetMimetype)
          Fetches a transformer to test for a given transformation.
 void setUp()
          Ensures that the temp locations are cleaned out before the tests start
 void testExtractContentFromSecuredPdf()
          This test method checks that the PDFBox-based transformer is able to extract image content from a secured PDF file.
 void testIsTransformable()
           
 void testTransformAdobeIllustrator()
          This test method checks that the PDFBox-based transformer is able to transform an Adobe Illustrator file to image.
 
Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerTest
additionalContentCheck, buildContentReader, getQuickFilenames, isQuickPhraseExpected, isQuickWordsExpected, isTransformationExcluded, loadNamedQuickTestFile, loadQuickTestFile, testAllConversions, testSetUp
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PdfBoxPdfToImageContentTransformerTest

public PdfBoxPdfToImageContentTransformerTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Description copied from class: AbstractContentTransformerTest
Ensures that the temp locations are cleaned out before the tests start

Overrides:
setUp in class AbstractContentTransformerTest
Throws:
java.lang.Exception

getTransformer

protected ContentTransformer getTransformer(java.lang.String sourceMimetype,
                                            java.lang.String targetMimetype)
Description copied from class: AbstractContentTransformerTest
Fetches a transformer to test for a given transformation. The transformer does not have to be reliable for the given format - if it isn't then it will be ignored.

Specified by:
getTransformer in class AbstractContentTransformerTest
Parameters:
sourceMimetype - the sourceMimetype to be tested
targetMimetype - the targetMimetype to be tested
Returns:
Returns the same transformer regardless - it is allowed

testIsTransformable

public void testIsTransformable()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testExtractContentFromSecuredPdf

public void testExtractContentFromSecuredPdf()
                                      throws java.lang.Exception
This test method checks that the PDFBox-based transformer is able to extract image content from a secured PDF file. See ALF-6650.

Throws:
java.lang.Exception
Since:
3.4.2

testTransformAdobeIllustrator

public void testTransformAdobeIllustrator()
                                   throws java.lang.Exception
This test method checks that the PDFBox-based transformer is able to transform an Adobe Illustrator file to image. Adobe Illustrator files (.ai) have been PostScript files in the past, but are now just pdf files.

Throws:
java.lang.Exception
Since:
3.5.0


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.