mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Add @since tags where known, and do a quick coding standards sweep
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31023 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -154,18 +154,24 @@ public abstract class AbstractMetadataExtracterTest extends TestCase
|
||||
protected void testCommonMetadata(String mimetype, Map<QName, Serializable> properties)
|
||||
{
|
||||
// One of Creator or Author
|
||||
if(!skipAuthorCheck(mimetype)) {
|
||||
if(properties.containsKey(ContentModel.PROP_CREATOR)) {
|
||||
if(!skipAuthorCheck(mimetype))
|
||||
{
|
||||
if(properties.containsKey(ContentModel.PROP_CREATOR))
|
||||
{
|
||||
assertEquals(
|
||||
"Property " + ContentModel.PROP_CREATOR + " not found for mimetype " + mimetype,
|
||||
QUICK_CREATOR,
|
||||
DefaultTypeConverter.INSTANCE.convert(String.class, properties.get(ContentModel.PROP_CREATOR)));
|
||||
} else if(properties.containsKey(ContentModel.PROP_AUTHOR)) {
|
||||
}
|
||||
else if(properties.containsKey(ContentModel.PROP_AUTHOR))
|
||||
{
|
||||
assertEquals(
|
||||
"Property " + ContentModel.PROP_AUTHOR + " not found for mimetype " + mimetype,
|
||||
QUICK_CREATOR,
|
||||
DefaultTypeConverter.INSTANCE.convert(String.class, properties.get(ContentModel.PROP_AUTHOR)));
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
fail("Expected one property out of " + ContentModel.PROP_CREATOR + " and " +
|
||||
ContentModel.PROP_AUTHOR + " but found neither of them for " + mimetype);
|
||||
}
|
||||
@@ -176,7 +182,8 @@ public abstract class AbstractMetadataExtracterTest extends TestCase
|
||||
"Property " + ContentModel.PROP_TITLE + " not found for mimetype " + mimetype,
|
||||
QUICK_TITLE,
|
||||
DefaultTypeConverter.INSTANCE.convert(String.class, properties.get(ContentModel.PROP_TITLE)));
|
||||
if (!skipDescriptionCheck(mimetype)) {
|
||||
if (!skipDescriptionCheck(mimetype))
|
||||
{
|
||||
assertEquals(
|
||||
"Property " + ContentModel.PROP_DESCRIPTION + " not found for mimetype " + mimetype,
|
||||
QUICK_DESCRIPTION,
|
||||
@@ -236,13 +243,16 @@ public abstract class AbstractMetadataExtracterTest extends TestCase
|
||||
}
|
||||
|
||||
|
||||
protected static void assertContains(String message, String needle, String haystack) {
|
||||
if(haystack.indexOf(needle) > -1) {
|
||||
protected static void assertContains(String message, String needle, String haystack)
|
||||
{
|
||||
if(haystack.indexOf(needle) > -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
fail(message);
|
||||
}
|
||||
protected static void assertContains(String needle, String haystack) {
|
||||
protected static void assertContains(String needle, String haystack)
|
||||
{
|
||||
assertContains("'" + needle + "' wasn't found in '" + haystack + "'", needle, haystack);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user