mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Build fix.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6256 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -58,7 +58,7 @@ public class HtmlMetadataExtracter extends AbstractMappingMetadataExtracter
|
||||
private static final String KEY_TITLE = "title";
|
||||
private static final String KEY_DESCRIPTION= "description";
|
||||
|
||||
private static final Set<String> MIMETYPES = new HashSet<String>(5);
|
||||
public static final Set<String> MIMETYPES = new HashSet<String>(5);
|
||||
static
|
||||
{
|
||||
MIMETYPES.add(MimetypeMap.MIMETYPE_HTML);
|
||||
|
@@ -31,13 +31,14 @@ import org.alfresco.repo.content.MimetypeMap;
|
||||
*/
|
||||
public class HtmlMetadataExtracterTest extends AbstractMetadataExtracterTest
|
||||
{
|
||||
private MetadataExtracter extracter;
|
||||
private HtmlMetadataExtracter extracter;
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
super.setUp();
|
||||
extracter = new HtmlMetadataExtracter();
|
||||
extracter.register();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,14 +49,13 @@ public class HtmlMetadataExtracterTest 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 text should not be supported", 0.0, reliability);
|
||||
|
||||
reliability = extracter.getReliability(MimetypeMap.MIMETYPE_HTML);
|
||||
assertEquals("HTML should be supported", 1.0, reliability);
|
||||
for (String mimetype : HtmlMetadataExtracter.MIMETYPES)
|
||||
{
|
||||
boolean supports = extracter.isSupported(mimetype);
|
||||
assertTrue("Mimetype should be supported: " + mimetype, supports);
|
||||
}
|
||||
}
|
||||
|
||||
public void testHtmlExtraction() throws Exception
|
||||
|
Reference in New Issue
Block a user