Package utils.common
Class IOUtilsTest
- java.lang.Object
-
- utils.common.IOUtilsTest
-
public class IOUtilsTest extends java.lang.ObjectUnit tests for IOUtils
-
-
Field Summary
Fields Modifier and Type Field Description org.junit.rules.TemporaryFoldertmp
-
Constructor Summary
Constructors Constructor Description IOUtilsTest()
-
Method Summary
-
-
-
Method Detail
-
initStatics
public static void initStatics()
-
tearDownStatics
public static void tearDownStatics()
-
testDeleteRecursivelyDeletesNestedDirectoryTree
public void testDeleteRecursivelyDeletesNestedDirectoryTree() throws java.lang.Exception- Throws:
java.lang.Exception
-
testDeleteRecursivelyDeletesSingleFile
public void testDeleteRecursivelyDeletesSingleFile() throws java.lang.Exception- Throws:
java.lang.Exception
-
testDeleteRecursivelyMissingPathThrows
public void testDeleteRecursivelyMissingPathThrows()
-
testCopyRecursivelyCopiesNestedTree
public void testCopyRecursivelyCopiesNestedTree() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCopyRecursivelyWithFilterCopiesOnlyMatchingFiles
public void testCopyRecursivelyWithFilterCopiesOnlyMatchingFiles() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCopyRecursivelyOverwritesExistingTargetFiles
public void testCopyRecursivelyOverwritesExistingTargetFiles() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetExistingFileSecurelyReturnsExistingFile
public void testGetExistingFileSecurelyReturnsExistingFile() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetExistingFileSecurelyRejectsMissingFile
public void testGetExistingFileSecurelyRejectsMissingFile() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetExistingFileSecurelyRejectsDirectory
public void testGetExistingFileSecurelyRejectsDirectory() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetExistingFileSecurelyRejectsPathTraversalAttack
public void testGetExistingFileSecurelyRejectsPathTraversalAttack() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetExistingFileSecurelyRejectsAbsoluteFilePath
public void testGetExistingFileSecurelyRejectsAbsoluteFilePath() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetExistingFileSecurelyRejectsBasePathThatIsNotAbsolute
public void testGetExistingFileSecurelyRejectsBasePathThatIsNotAbsolute() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetExistingFileSecurelyRejectsTraversalEvenIfTargetExists
public void testGetExistingFileSecurelyRejectsTraversalEvenIfTargetExists() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGenerateFileName
public void testGenerateFileName()
-
testCheckFilename
public void testCheckFilename()
-
testGetResultsPathForJson
public void testGetResultsPathForJson()
-
testGetResultsPathForJsonForZip
public void testGetResultsPathForJsonForZip()
-
testExistsAndSecure
public void testExistsAndSecure() throws java.lang.Exception- Throws:
java.lang.Exception
-
testStudyAssetsDirOperations
public void testStudyAssetsDirOperations() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetFileInStudyAssetsDir_andExisting
public void testGetFileInStudyAssetsDir_andExisting() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetFileInStudyAssetsDirRejectsMissingFilePath
public void testGetFileInStudyAssetsDirRejectsMissingFilePath() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetFileInStudyAssetsDirRejectsPathTraversalAttack
public void testGetFileInStudyAssetsDirRejectsPathTraversalAttack() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetFileInStudyAssetsDirRejectsAbsoluteFilePath
public void testGetFileInStudyAssetsDirRejectsAbsoluteFilePath() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetFileInStudyAssetsDirAllowsRelativeSubdirectoryPath
public void testGetFileInStudyAssetsDirAllowsRelativeSubdirectoryPath() throws java.lang.Exception- Throws:
java.lang.Exception
-
testGetStudyAssetsDirSize
public void testGetStudyAssetsDirSize() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCloneComponentHtmlFileClonesRootHtmlFile
public void testCloneComponentHtmlFileClonesRootHtmlFile() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCloneComponentHtmlFileClonesNestedHtmlFile
public void testCloneComponentHtmlFileClonesNestedHtmlFile() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCloneComponentHtmlFileCreatesNumericSuffixWhenCloneExists
public void testCloneComponentHtmlFileCreatesNumericSuffixWhenCloneExists() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCloneComponentHtmlFileThrowsIfSourceIsMissing
public void testCloneComponentHtmlFileThrowsIfSourceIsMissing() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCloneComponentHtmlFileThrowsIfSourceIsDirectory
public void testCloneComponentHtmlFileThrowsIfSourceIsDirectory() throws java.lang.Exception- Throws:
java.lang.Exception
-
testRenameHtmlFile
public void testRenameHtmlFile() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCloneStudyAssetsDirectory
public void testCloneStudyAssetsDirectory() throws java.lang.Exception- Throws:
java.lang.Exception
-
testResultUploadsHelpers
public void testResultUploadsHelpers() throws java.lang.Exception- Throws:
java.lang.Exception
-
testMoveAndDetectOverwriteMovesWithoutOverwrite
public void testMoveAndDetectOverwriteMovesWithoutOverwrite() throws java.lang.Exception- Throws:
java.lang.Exception
-
testMoveAndDetectOverwriteOverwritesExistingTarget
public void testMoveAndDetectOverwriteOverwritesExistingTarget() throws java.lang.Exception- Throws:
java.lang.Exception
-
testMoveAndDetectOverwriteWorksForDirectories
public void testMoveAndDetectOverwriteWorksForDirectories() throws java.lang.Exception- Throws:
java.lang.Exception
-
testMoveAndDetectOverwriteOverwritesExistingDirectory
public void testMoveAndDetectOverwriteOverwritesExistingDirectory() throws java.lang.Exception- Throws:
java.lang.Exception
-
-