org.alfresco.repo.content.transform
Class OpenOfficeContentTransformerTest

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.OpenOfficeContentTransformerTest
All Implemented Interfaces:
junit.framework.Test

public class OpenOfficeContentTransformerTest
extends AbstractContentTransformerTest

See Also:
OpenOfficeContentTransformerWorker

Field Summary
 
Fields inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerTest
ctx, mimetypeService, QUICK_CONTENT, serviceRegistry
 
Constructor Summary
OpenOfficeContentTransformerTest()
           
 
Method Summary
protected  ContentTransformer getTransformer(java.lang.String sourceMimetype, java.lang.String targetMimetype)
          Fetches a transformer to test for a given transformation.
protected  boolean isTransformationExcluded(java.lang.String sourceExtension, java.lang.String targetExtension)
          Some transformations fail intermittently within OOo on our test server.
 void setUp()
          Ensures that the temp locations are cleaned out before the tests start
 void testEmptyHtmlToEmptyPdf()
          ALF-219.
 void testHtmlToPdf()
          Test what is up with HTML to PDF
 void testReliability()
           
 void testSetUp()
          Check that all objects are present
 
Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerTest
additionalContentCheck, buildContentReader, getQuickFilenames, isQuickPhraseExpected, isQuickWordsExpected, loadNamedQuickTestFile, loadQuickTestFile, testAllConversions
 
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

OpenOfficeContentTransformerTest

public OpenOfficeContentTransformerTest()
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

testSetUp

public void testSetUp()
               throws java.lang.Exception
Description copied from class: AbstractContentTransformerTest
Check that all objects are present

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

testReliability

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

testHtmlToPdf

public void testHtmlToPdf()
                   throws java.lang.Exception
Test what is up with HTML to PDF

Throws:
java.lang.Exception

testEmptyHtmlToEmptyPdf

public void testEmptyHtmlToEmptyPdf()
                             throws java.lang.Exception
ALF-219. Transforamtion from .html to .pdf for empty file.

Throws:
java.lang.Exception

isTransformationExcluded

protected boolean isTransformationExcluded(java.lang.String sourceExtension,
                                           java.lang.String targetExtension)
Some transformations fail intermittently within OOo on our test server. Rather than exclude these transformations from product code, where they may work (e.g. due to different OOo version installed), they are excluded from this test.

Overrides:
isTransformationExcluded in class AbstractContentTransformerTest
Returns:


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