mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Enhance test to also check the html table contents
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23039 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -106,6 +106,27 @@ public class PoiHssfContentTransformerTest extends TikaPoweredContentTransformer
|
|||||||
"Content not properly CSV'd",
|
"Content not properly CSV'd",
|
||||||
contents.contains("\"The\",\"quick\",\"brown\",\"fox\"")
|
contents.contains("\"The\",\"quick\",\"brown\",\"fox\"")
|
||||||
);
|
);
|
||||||
|
} else if(targetMimetype.equals(MimetypeMap.MIMETYPE_XML)) {
|
||||||
|
// First check we got the usual bits
|
||||||
|
super.additionalContentCheck(sourceMimetype, targetMimetype, contents);
|
||||||
|
|
||||||
|
// Now check tables came out correctly
|
||||||
|
assertTrue(
|
||||||
|
"Content lacks XHTML table tags:\n" + contents,
|
||||||
|
contents.contains("<table>")
|
||||||
|
);
|
||||||
|
assertTrue(
|
||||||
|
"Content lacks XHTML table tags:\n" + contents,
|
||||||
|
contents.contains("<tr>")
|
||||||
|
);
|
||||||
|
assertTrue(
|
||||||
|
"Content lacks XHTML table tags:\n" + contents,
|
||||||
|
contents.contains("<td>1</td>")
|
||||||
|
);
|
||||||
|
assertTrue(
|
||||||
|
"Content lacks XHTML table tags:\n" + contents,
|
||||||
|
contents.contains("<td>The</td>")
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
super.additionalContentCheck(sourceMimetype, targetMimetype, contents);
|
super.additionalContentCheck(sourceMimetype, targetMimetype, contents);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user