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_TITLE = "title";
|
||||||
private static final String KEY_DESCRIPTION= "description";
|
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
|
static
|
||||||
{
|
{
|
||||||
MIMETYPES.add(MimetypeMap.MIMETYPE_HTML);
|
MIMETYPES.add(MimetypeMap.MIMETYPE_HTML);
|
||||||
|
@@ -31,13 +31,14 @@ import org.alfresco.repo.content.MimetypeMap;
|
|||||||
*/
|
*/
|
||||||
public class HtmlMetadataExtracterTest extends AbstractMetadataExtracterTest
|
public class HtmlMetadataExtracterTest extends AbstractMetadataExtracterTest
|
||||||
{
|
{
|
||||||
private MetadataExtracter extracter;
|
private HtmlMetadataExtracter extracter;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUp() throws Exception
|
public void setUp() throws Exception
|
||||||
{
|
{
|
||||||
super.setUp();
|
super.setUp();
|
||||||
extracter = new HtmlMetadataExtracter();
|
extracter = new HtmlMetadataExtracter();
|
||||||
|
extracter.register();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,14 +49,13 @@ public class HtmlMetadataExtracterTest extends AbstractMetadataExtracterTest
|
|||||||
return extracter;
|
return extracter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testReliability() throws Exception
|
public void testSupports() throws Exception
|
||||||
{
|
{
|
||||||
double reliability = 0.0;
|
for (String mimetype : HtmlMetadataExtracter.MIMETYPES)
|
||||||
reliability = extracter.getReliability(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
{
|
||||||
assertEquals("Mimetype text should not be supported", 0.0, reliability);
|
boolean supports = extracter.isSupported(mimetype);
|
||||||
|
assertTrue("Mimetype should be supported: " + mimetype, supports);
|
||||||
reliability = extracter.getReliability(MimetypeMap.MIMETYPE_HTML);
|
}
|
||||||
assertEquals("HTML should be supported", 1.0, reliability);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHtmlExtraction() throws Exception
|
public void testHtmlExtraction() throws Exception
|
||||||
|
Reference in New Issue
Block a user