Class FileSystemFileServiceProviderTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.broadleafcommerce.common.file.service.FileSystemFileServiceProviderTest
- All Implemented Interfaces:
junit.framework.Test
public class FileSystemFileServiceProviderTest
extends junit.framework.TestCase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFor example, if the URL is /product/myproductimage.jpg, then the MD5 would be 35ec52a8dbd8cf3e2c650495001fe55f resulting in the following file on the filesystem {assetFileSystemPath}/64/a7/myproductimage.jpg.Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
-
Constructor Details
-
FileSystemFileServiceProviderTest
public FileSystemFileServiceProviderTest()
-
-
Method Details
-
testBuildFileName
For example, if the URL is /product/myproductimage.jpg, then the MD5 would be 35ec52a8dbd8cf3e2c650495001fe55f resulting in the following file on the filesystem {assetFileSystemPath}/64/a7/myproductimage.jpg. If there is a "siteId" in the BroadleafRequestContext then the site is also distributed using a similar algorithm but the system attempts to keep images for sites in their own directory resulting in an extra two folders required to reach any given product. So, for site with id 125, the system will MD5 "site125" in order to build the URL string. "site125" has an md5 string of "7d905e85b8cb72a0477632be2c342bd6". So, in this case with the above product URL in site125, the full URL on the filesystem will be: {assetFileSystemPath}/7d/site125/64/a7/myproductimage.jpg.- Throws:
Exception
-