1 package org.alfresco.repo.content.metadata; 2 3 import org.alfresco.repo.content.MimetypeMap; 4 5 10 public class PdfBoxMetadataExtracterTest extends AbstractMetadataExtracterTest 11 { 12 private MetadataExtracter extracter; 13 14 @Override 15 public void setUp() throws Exception 16 { 17 super.setUp(); 18 extracter = new PdfBoxMetadataExtracter(); 19 } 20 21 24 protected MetadataExtracter getExtracter() 25 { 26 return extracter; 27 } 28 29 public void testReliability() throws Exception 30 { 31 double reliability = 0.0; 32 reliability = extracter.getReliability(MimetypeMap.MIMETYPE_TEXT_PLAIN); 33 assertEquals("Mimetype should not be supported", 0.0, reliability); 34 35 reliability = extracter.getReliability(MimetypeMap.MIMETYPE_PDF); 36 assertEquals("Mimetype should be supported", 1.0, reliability); 37 } 38 39 public void testPdfExtraction() throws Exception 40 { 41 testExtractFromMimetype(MimetypeMap.MIMETYPE_PDF); 42 } 43 } 44 | Popular Tags |