Package ru.akman.maven.plugins
Class TestUtils
java.lang.Object
ru.akman.maven.plugins.TestUtils
Test helper class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
buildPathFromFiles
(List<File> files) Build the path contains all file paths from a list separated by the default path separator.static String
buildPathFromFiles
(List<File> files, String separator) Build the path contains all file paths from a list separated by the specified separator.static String
buildPathFromNames
(String base, List<String> names) Build the path contains all resolved file paths from a list separated by the default path separator.static String
buildPathFromNames
(String base, List<String> names, String separator) Build the path contains all resolved file paths from a list separated by the specified separator.static String
buildStringFromNames
(List<String> names) Build the string contains all strings from a list separated by the system line separator.static String
buildStringFromNames
(List<String> names, String separator) Build the string contains all strings from a list separated by the specified separator.static String
getCanonicalPath
(File file) Get the canonical path for specified file.
-
Method Details
-
getCanonicalPath
Get the canonical path for specified file. Caller test fails if IOException occures.- Parameters:
file
- file- Returns:
- canonical path
-
buildPathFromFiles
Build the path contains all file paths from a list separated by the default path separator.- Parameters:
files
- list of files- Returns:
- path contains all file paths from a list
-
buildPathFromFiles
Build the path contains all file paths from a list separated by the specified separator.- Parameters:
files
- list of filesseparator
- separator string- Returns:
- path contains all file paths from a list
-
buildPathFromNames
Build the path contains all resolved file paths from a list separated by the default path separator.- Parameters:
base
- base path to resolve paths from the listnames
- list of relative paths- Returns:
- path contains all resolved file paths from a list
-
buildPathFromNames
Build the path contains all resolved file paths from a list separated by the specified separator.- Parameters:
base
- base path to resolve paths from the listnames
- list of relative pathsseparator
- separator string- Returns:
- path contains all resolved file paths from a list
-
buildStringFromNames
Build the string contains all strings from a list separated by the system line separator.- Parameters:
names
- list of string- Returns:
- one string contains all the specified strings from the list
-
buildStringFromNames
Build the string contains all strings from a list separated by the specified separator.- Parameters:
names
- list of stringseparator
- separator string- Returns:
- one string contains all the specified strings from the list
-