Package jetbrains
Class TestUtil
- java.lang.Object
-
- jetbrains.TestUtil
-
public class TestUtil extends Object
- Author:
- Pavel.Sher Date: 15.11.2008
-
-
Constructor Summary
Constructors Constructor Description TestUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<String>
ciStringSet(Collection<String> strings)
static boolean
isFreeBSD()
static boolean
isMacOS()
static File
jarClasses(File jarFile, Class<?>... classes)
Creates jar from a list of classes.static int
nextTestId()
static void
replaceInFile(File file, String regex, String replacement, boolean failIfNotFound)
Replaces all occurence of substrings specified by the regular expression with the given replacement.
-
-
-
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 archeiveclasses
- - classes to put- Returns:
- returns jarFile parameter value
- Throws:
IOException
- if no luck
-
ciStringSet
@NotNull public static Set<String> ciStringSet(@NotNull Collection<String> strings)
-
nextTestId
public static int nextTestId()
-
-