Package jetbrains

Class TestUtil


  • public class TestUtil
    extends Object
    Author:
    Pavel.Sher Date: 15.11.2008
    • Constructor Detail

      • TestUtil

        public TestUtil()
    • Method Detail

      • isFreeBSD

        public static boolean isFreeBSD()
      • isMacOS

        public static boolean isMacOS()
      • replaceInFile

        public static void replaceInFile​(@NotNull
                                         File file,
                                         @NotNull
                                         String regex,
                                         @NotNull
                                         String replacement,
                                         boolean failIfNotFound)
        Replaces all occurence of substrings specified by the regular expression with the given replacement.
        Parameters:
        file -
        regex -
        replacement -
        failIfNotFound -
      • jarClasses

        public static File jarClasses​(File jarFile,
                                      Class<?>... classes)
                               throws IOException
        Creates jar from a list of classes. No dependency tracking is done at all.
        Parameters:
        jarFile - - file to write archeive
        classes - - classes to put
        Returns:
        returns jarFile parameter value
        Throws:
        IOException - if no luck
      • nextTestId

        public static int nextTestId()