Class PathTemplateTest
java.lang.Object
de.hybris.platform.acceleratorservices.velocity.BaseFileSandBoxTest
de.hybris.platform.acceleratorservices.velocity.resource.store.PathTemplateTest
@ContextConfiguration(locations="classpath:/acceleratorservices/test/impexgenerator/test-generate-impex-spring.xml")
@UnitTest
public class PathTemplateTest
extends BaseFileSandBoxTest
Test presenting other strategy for resolving target dir. target dir is calculated as: starting from first common
folder for target and source dir we build a mirror path relative in target dir as it was in source dir . Example :
source: /mainSource/subFolder/data/template.vt target: /mainTarget/So the out put folder for
MirroredStructureScriptUrlContext.getTargetScriptEffectivePath() will be
/mainTarget/subFolder/data/template.vtConsequently for a case :
source: /root/folderA/template.vt target: /root/folderB/, will produce a :
/root/folderB/template.vt
-
Field Summary
Fields inherited from class de.hybris.platform.acceleratorservices.velocity.BaseFileSandBoxTest
GENERATED_IMPEXES_DIR, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreatePathInSandBox(String path) protected Fileprotected org.springframework.core.io.Resourcevoidteardown()voidvoidvoidvoidvoidMethods inherited from class de.hybris.platform.acceleratorservices.velocity.BaseFileSandBoxTest
assertGenerated, assertHasLine, assertNothingGenerated, cleanUp, cleanUpFileStructure, getAllMatchingTemplates, getAllMatchingTemplates, prepare
-
Constructor Details
-
PathTemplateTest
public PathTemplateTest()
-
-
Method Details
-
getRootDir
protected org.springframework.core.io.Resource getRootDir()- Specified by:
getRootDirin classBaseFileSandBoxTest
-
testRelativePaths
- Throws:
IOException
-
testRelativePathsOtherCase
- Throws:
IOException
-
testRelativePathsOtherPathsConcat
- Throws:
IOException
-
testRelativePathsCornerCase
- Throws:
IOException
-
testRelativePathsSampleDateCase
- Throws:
IOException
-
createPathInSandBox
- Throws:
IOException
-
createSetupDirInSandBox
- Throws:
IOException
-
teardown
- Throws:
IOException
-