|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.alfresco.repo.content.metadata.AbstractMetadataExtracterTest
public abstract class AbstractMetadataExtracterTest
MetadataExtracter
,
AbstractMetadataExtracter
Field Summary | |
---|---|
protected org.springframework.context.ApplicationContext |
ctx
This context will be fetched each time, but almost always will have been cached by ApplicationContextHelper |
protected org.alfresco.service.cmr.dictionary.DictionaryService |
dictionaryService
|
protected org.alfresco.repo.content.MimetypeMap |
mimetypeMap
|
static java.lang.String |
QUICK_CREATOR
|
static java.lang.String |
QUICK_CREATOR_EMAIL
|
static java.lang.String |
QUICK_DESCRIPTION
|
static java.lang.String |
QUICK_PREVIOUS_AUTHOR
|
static java.lang.String |
QUICK_TITLE
|
Constructor Summary | |
---|---|
AbstractMetadataExtracterTest()
|
Method Summary | |
---|---|
protected static void |
assertContains(java.lang.String needle,
java.lang.String haystack)
|
protected static void |
assertContains(java.lang.String message,
java.lang.String needle,
java.lang.String haystack)
|
protected java.util.Map |
extractFromFile(java.io.File sourceFile,
java.lang.String mimetype)
|
protected java.util.Map |
extractFromMimetype(java.lang.String mimetype)
|
protected abstract MetadataExtracter |
getExtracter()
|
void |
setUp()
Ensures that the temp locations are cleaned out before the tests start |
protected boolean |
skipAuthorCheck(java.lang.String mimetype)
This method can be overridden to cause the author/creator property check to be skipped. |
protected boolean |
skipDescriptionCheck(java.lang.String mimetype)
This method can be overridden to cause the description property check to be skipped. |
protected void |
testCommonMetadata(java.lang.String mimetype,
java.util.Map properties)
Tests that we can get the common metadata correctly from the file. |
protected void |
testExtractFromMimetype(java.lang.String mimetype)
|
protected abstract void |
testFileSpecificMetadata(java.lang.String mimetype,
java.util.Map properties)
|
void |
testSetUp()
Check that all objects are present |
void |
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 |
Field Detail |
---|
protected org.springframework.context.ApplicationContext ctx
ApplicationContextHelper
public static final java.lang.String QUICK_TITLE
public static final java.lang.String QUICK_DESCRIPTION
public static final java.lang.String QUICK_CREATOR
public static final java.lang.String QUICK_CREATOR_EMAIL
public static final java.lang.String QUICK_PREVIOUS_AUTHOR
protected org.alfresco.repo.content.MimetypeMap mimetypeMap
protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
Constructor Detail |
---|
public AbstractMetadataExtracterTest()
Method Detail |
---|
protected abstract MetadataExtracter getExtracter()
public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
public void testSetUp() throws java.lang.Exception
java.lang.Exception
protected void testExtractFromMimetype(java.lang.String mimetype) throws java.lang.Exception
java.lang.Exception
protected java.util.Map extractFromMimetype(java.lang.String mimetype) throws java.lang.Exception
java.lang.Exception
protected java.util.Map extractFromFile(java.io.File sourceFile, java.lang.String mimetype) throws java.lang.Exception
java.lang.Exception
protected void testCommonMetadata(java.lang.String mimetype, java.util.Map properties)
protected abstract void testFileSpecificMetadata(java.lang.String mimetype, java.util.Map properties)
protected boolean skipAuthorCheck(java.lang.String mimetype)
mimetype
-
true
to skip the checks, else false
protected boolean skipDescriptionCheck(java.lang.String mimetype)
mimetype
-
true
to skip the checks, else false
public void testZeroLengthFile() throws java.lang.Exception
java.lang.Exception
protected static void assertContains(java.lang.String message, java.lang.String needle, java.lang.String haystack)
protected static void assertContains(java.lang.String needle, java.lang.String haystack)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |