org.alfresco.repo.content.transform
Class PoiHssfContentTransformerTest

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.TikaPoweredContentTransformerTest
                  extended by org.alfresco.repo.content.transform.PoiHssfContentTransformerTest
All Implemented Interfaces:
junit.framework.Test

public class PoiHssfContentTransformerTest
extends TikaPoweredContentTransformerTest

See Also:
PoiHssfContentTransformer

Field Summary
 
Fields inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerTest
ctx, mimetypeService, QUICK_CONTENT, serviceRegistry
 
Constructor Summary
PoiHssfContentTransformerTest()
           
 
Method Summary
protected  void additionalContentCheck(java.lang.String sourceMimetype, java.lang.String targetMimetype, java.lang.String contents)
          Tests for html vs xml vs plain text
protected  java.lang.String[] getQuickFilenames(java.lang.String sourceMimetype)
          For the given mime type, returns one or more quick* files to be tested.
protected  ContentTransformer getTransformer(java.lang.String sourceMimetype, java.lang.String targetMimetype)
          Fetches a transformer to test for a given transformation.
protected  boolean isQuickPhraseExpected(java.lang.String targetMimetype)
          This method is an extension point for enabling/disabling an assertion that the "quick brown fox" phrase is present in the transformed content.
 void setUp()
          Ensures that the temp locations are cleaned out before the tests start
 void testCsvOutput()
           
 void testIsTransformable()
           
 void xxtestBugFixAR114()
          Tests a specific failure in the library
 
Methods inherited from class org.alfresco.repo.content.transform.TikaPoweredContentTransformerTest
isQuickWordsExpected
 
Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerTest
buildContentReader, 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

PoiHssfContentTransformerTest

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

getQuickFilenames

protected java.lang.String[] getQuickFilenames(java.lang.String sourceMimetype)
Description copied from class: AbstractContentTransformerTest
For the given mime type, returns one or more quick* files to be tested. By default this is just quick + the default extension. However, you can override this if you need special rules, eg quickOld.foo, quickMid.foo and quickNew.foo for differing versions of the file format.

Overrides:
getQuickFilenames in class AbstractContentTransformerTest

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

testCsvOutput

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

additionalContentCheck

protected void additionalContentCheck(java.lang.String sourceMimetype,
                                      java.lang.String targetMimetype,
                                      java.lang.String contents)
Description copied from class: TikaPoweredContentTransformerTest
Tests for html vs xml vs plain text

Overrides:
additionalContentCheck in class TikaPoweredContentTransformerTest

isQuickPhraseExpected

protected boolean isQuickPhraseExpected(java.lang.String targetMimetype)
Description copied from class: AbstractContentTransformerTest
This method is an extension point for enabling/disabling an assertion that the "quick brown fox" phrase is present in the transformed content. By default, the phrase is expected in all text/plain outputs.

Overrides:
isQuickPhraseExpected in class TikaPoweredContentTransformerTest
Parameters:
targetMimetype - mimetype of the target of the transformation
Returns:
true if phrase is expected else false.

xxtestBugFixAR114

public void xxtestBugFixAR114()
                       throws java.lang.Exception
Tests a specific failure in the library

Throws:
java.lang.Exception


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