Class TestUtils

java.lang.Object
ru.akman.maven.plugins.TestUtils

public final class TestUtils extends Object
Test helper class.
  • Method Details

    • getCanonicalPath

      public static String getCanonicalPath(File file)
      Get the canonical path for specified file. Caller test fails if IOException occures.
      Parameters:
      file - file
      Returns:
      canonical path
    • buildPathFromFiles

      public static String buildPathFromFiles(List<File> files)
      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

      public static String buildPathFromFiles(List<File> files, String separator)
      Build the path contains all file paths from a list separated by the specified separator.
      Parameters:
      files - list of files
      separator - separator string
      Returns:
      path contains all file paths from a list
    • buildPathFromNames

      public 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.
      Parameters:
      base - base path to resolve paths from the list
      names - list of relative paths
      Returns:
      path contains all resolved file paths from a list
    • buildPathFromNames

      public 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.
      Parameters:
      base - base path to resolve paths from the list
      names - list of relative paths
      separator - separator string
      Returns:
      path contains all resolved file paths from a list
    • buildStringFromNames

      public static String buildStringFromNames(List<String> names)
      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

      public static String buildStringFromNames(List<String> names, String separator)
      Build the string contains all strings from a list separated by the specified separator.
      Parameters:
      names - list of string
      separator - separator string
      Returns:
      one string contains all the specified strings from the list