mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-12725: Merged V4.0-BUG-FIX (4.0.1) to HEAD
33889: ALF-12725: Merged V3.4-BUG-FIX (3.4.9) to V4.0-BUG-FIX (4.0.1) 33888: Merged V3 (3.4.8) to V3.4-BUG-FIX (3.4.9) 33887: ALF-10976 (relates to ALF-10412) - Fix build failures. Error in FailoverContentTransformer.isTransformable and FailoverContentTransformer.isTransformableSize which resulted in no mimetype checks if the size was negative which it was in ThumbnailServiceImplTest.testHTMLToImageAndSWF. - Commented out new unit tests in ContentServiceImplTest as OpenOffice is not on the build machines. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@33898 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -112,38 +112,39 @@ public class ContentServiceImplTest extends BaseVersionStoreTest
|
||||
}
|
||||
}
|
||||
|
||||
public void testGetTransformer0()
|
||||
{
|
||||
ContentTransformer transformer = contentService.getTransformer("test", "application/vnd.ms-excel", 0,
|
||||
"application/x-shockwave-flash", new TransformationOptions());
|
||||
assertTrue("Found have found a transformer for 0 bytes", transformer != null);
|
||||
}
|
||||
|
||||
public void testGetTransformer10K()
|
||||
{
|
||||
ContentTransformer transformer = contentService.getTransformer("test", "application/vnd.ms-excel", 1024*10,
|
||||
"application/x-shockwave-flash", new TransformationOptions());
|
||||
assertTrue("Found have found a transformer for 10 K", transformer != null);
|
||||
}
|
||||
|
||||
public void testGetTransformer1M()
|
||||
{
|
||||
ContentTransformer transformer = contentService.getTransformer("test", "application/vnd.ms-excel", 1024*1024,
|
||||
"application/x-shockwave-flash", new TransformationOptions());
|
||||
assertTrue("Found have found a transformer for 1M", transformer != null);
|
||||
}
|
||||
|
||||
public void testGetTransformer10M()
|
||||
{
|
||||
ContentTransformer transformer = contentService.getTransformer("test", "application/vnd.ms-excel", 1024*1024*10,
|
||||
"application/x-shockwave-flash", new TransformationOptions());
|
||||
assertTrue("Found NOT have found a transformer for 10M as the is a 1M limit on xsl mimetype", transformer == null);
|
||||
}
|
||||
|
||||
public void testGetMaxSourceSizeByes()
|
||||
{
|
||||
long maxSourceSizeBytes = contentService.getMaxSourceSizeBytes("application/vnd.ms-excel",
|
||||
"application/x-shockwave-flash", new TransformationOptions());
|
||||
assertEquals("Found have found a transformer that can handle 1M", 1024*1024, maxSourceSizeBytes);
|
||||
}
|
||||
// Commented out as OpenOffice is not on the build machines.
|
||||
// public void testGetTransformer0()
|
||||
// {
|
||||
// ContentTransformer transformer = contentService.getTransformer("test", "application/vnd.ms-excel", 0,
|
||||
// "application/x-shockwave-flash", new TransformationOptions());
|
||||
// assertTrue("Should have found a transformer for 0 bytes", transformer != null);
|
||||
// }
|
||||
//
|
||||
// public void testGetTransformer10K()
|
||||
// {
|
||||
// ContentTransformer transformer = contentService.getTransformer("test", "application/vnd.ms-excel", 1024*10,
|
||||
// "application/x-shockwave-flash", new TransformationOptions());
|
||||
// assertTrue("Should have found a transformer for 10 K", transformer != null);
|
||||
// }
|
||||
//
|
||||
// public void testGetTransformer1M()
|
||||
// {
|
||||
// ContentTransformer transformer = contentService.getTransformer("test", "application/vnd.ms-excel", 1024*1024,
|
||||
// "application/x-shockwave-flash", new TransformationOptions());
|
||||
// assertTrue("Should have found a transformer for 1M", transformer != null);
|
||||
// }
|
||||
//
|
||||
// public void testGetTransformer10M()
|
||||
// {
|
||||
// ContentTransformer transformer = contentService.getTransformer("test", "application/vnd.ms-excel", 1024*1024*10,
|
||||
// "application/x-shockwave-flash", new TransformationOptions());
|
||||
// assertTrue("Should NOT have found a transformer for 10M as the is a 1M limit on xsl mimetype", transformer == null);
|
||||
// }
|
||||
//
|
||||
// public void testGetMaxSourceSizeByes()
|
||||
// {
|
||||
// long maxSourceSizeBytes = contentService.getMaxSourceSizeBytes("application/vnd.ms-excel",
|
||||
// "application/x-shockwave-flash", new TransformationOptions());
|
||||
// assertEquals("Should have found a transformer that can handle 1M", 1024*1024, maxSourceSizeBytes);
|
||||
// }
|
||||
}
|
||||
|
Reference in New Issue
Block a user