org.alfresco.repo.content.metadata
Class RFC822MetadataExtracterTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.content.metadata.AbstractMetadataExtracterTest
              extended by org.alfresco.repo.content.metadata.RFC822MetadataExtracterTest
All Implemented Interfaces:
junit.framework.Test

public class RFC822MetadataExtracterTest
extends AbstractMetadataExtracterTest

Test for the RFC822 (imap/mbox) extractor


Field Summary
 
Fields inherited from class org.alfresco.repo.content.metadata.AbstractMetadataExtracterTest
ctx, dictionaryService, mimetypeMap, QUICK_CREATOR, QUICK_CREATOR_EMAIL, QUICK_DESCRIPTION, QUICK_PREVIOUS_AUTHOR, QUICK_TITLE
 
Constructor Summary
RFC822MetadataExtracterTest()
           
 
Method Summary
protected  MetadataExtracter getExtracter()
           
 void setUp()
          Ensures that the temp locations are cleaned out before the tests start
protected  void testCommonMetadata(java.lang.String mimetype, java.util.Map properties)
          We have no author, and have the same title and description
 void testEmailExtraction()
           
 void testFileSpecificMetadata(java.lang.String mimetype, java.util.Map properties)
          Test our extra IMAP properties
 void testHasDateFormats()
          RFC822 has a non-standard date format.
 void testSupports()
           
 
Methods inherited from class org.alfresco.repo.content.metadata.AbstractMetadataExtracterTest
assertContains, assertContains, extractFromFile, extractFromMimetype, skipAuthorCheck, skipDescriptionCheck, testExtractFromMimetype, testSetUp, testZeroLengthFile
 
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

RFC822MetadataExtracterTest

public RFC822MetadataExtracterTest()
Method Detail

setUp

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

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

getExtracter

protected MetadataExtracter getExtracter()
Specified by:
getExtracter in class AbstractMetadataExtracterTest
Returns:
Returns the same transformer regardless - it is allowed

testHasDateFormats

public void testHasDateFormats()
                        throws java.lang.Exception
RFC822 has a non-standard date format. Check that this was sprung-in - if not, then other tests will fail!

Throws:
java.lang.Exception

testSupports

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

testEmailExtraction

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

testCommonMetadata

protected void testCommonMetadata(java.lang.String mimetype,
                                  java.util.Map properties)
We have no author, and have the same title and description

Overrides:
testCommonMetadata in class AbstractMetadataExtracterTest

testFileSpecificMetadata

public void testFileSpecificMetadata(java.lang.String mimetype,
                                     java.util.Map properties)
Test our extra IMAP properties

Specified by:
testFileSpecificMetadata in class AbstractMetadataExtracterTest


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