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:
Alan Davis
2012-02-14 22:52:27 +00:00
parent b85e786025
commit ffb5aa8f40
3 changed files with 62 additions and 60 deletions

View File

@@ -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);
// }
}