1 17 package org.alfresco.repo.content.metadata; 18 19 20 23 public class UnoMetadataExtracterTest extends AbstractMetadataExtracterTest 24 { 25 private UnoMetadataExtracter extracter; 26 27 @Override 28 public void setUp() throws Exception 29 { 30 super.setUp(); 31 extracter = new UnoMetadataExtracter(); 32 extracter.setMimetypeService(mimetypeMap); 33 extracter.init(); 34 } 35 36 39 protected MetadataExtracter getExtracter() 40 { 41 return extracter; 42 } 43 44 public void testReliability() throws Exception 45 { 46 if (!extracter.isConnected()) 47 { 48 return; 49 } 50 51 for (String mimetype : UnoMetadataExtracter.SUPPORTED_MIMETYPES) 52 { 53 double reliability = extracter.getReliability(mimetype); 54 assertTrue("Expected above zero reliability", reliability > 0.0); 55 } 56 } 57 58 public void testSupportedMimetypes() throws Exception 59 { 60 if (!extracter.isConnected()) 61 { 62 return; 63 } 64 for (String mimetype : UnoMetadataExtracter.SUPPORTED_MIMETYPES) 65 { 66 testExtractFromMimetype(mimetype); 67 } 68 } 69 } 70 | Popular Tags |