mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Updated PdfBoxMetadataExtracter to new mappable format
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5928 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -9,13 +9,14 @@ import org.alfresco.repo.content.MimetypeMap;
|
||||
*/
|
||||
public class PdfBoxMetadataExtracterTest extends AbstractMetadataExtracterTest
|
||||
{
|
||||
private MetadataExtracter extracter;
|
||||
private PdfBoxMetadataExtracter extracter;
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
super.setUp();
|
||||
extracter = new PdfBoxMetadataExtracter();
|
||||
extracter.register();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -26,14 +27,13 @@ public class PdfBoxMetadataExtracterTest extends AbstractMetadataExtracterTest
|
||||
return extracter;
|
||||
}
|
||||
|
||||
public void testReliability() throws Exception
|
||||
public void testSupports() throws Exception
|
||||
{
|
||||
double reliability = 0.0;
|
||||
reliability = extracter.getReliability(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||
assertEquals("Mimetype should not be supported", 0.0, reliability);
|
||||
|
||||
reliability = extracter.getReliability(MimetypeMap.MIMETYPE_PDF);
|
||||
assertEquals("Mimetype should be supported", 1.0, reliability);
|
||||
for (String mimetype : PdfBoxMetadataExtracter.SUPPORTED_MIMETYPES)
|
||||
{
|
||||
boolean supports = extracter.isSupported(mimetype);
|
||||
assertTrue("Mimetype should be supported: " + mimetype, supports);
|
||||
}
|
||||
}
|
||||
|
||||
public void testPdfExtraction() throws Exception
|
||||
|
Reference in New Issue
Block a user