- * If a list is not explicitly supplied then PIT will default to a list of common logging packages as follows - *
- *
- * If the feature {@code FLOGCALL} is disabled, this parameter is ignored and logging calls are also mutated.
- * Additional classpath entries to use when looking for tests and mutable code.
- *
- * @param path one or more paths
- * @return this operation instance
- * @see #classPathPaths(Collection)
- */
- public PitestOperation classPath(Path... path) {
- return classPathPaths(List.of(path));
+ options_.put("--classPath", String.join(",", Arrays.stream(path).filter(this::isNotBlank).toList()));
+ return this;
}
/**
@@ -182,30 +145,6 @@ public class PitestOperation extends AbstractProcessOperation
- * If a list is not explicitly supplied then PIT will default to a list of common logging packages as follows
- *
- *
- * If the feature {@code FLOGCALL} is disabled, this parameter is ignored and logging calls are also mutated.
- * Additional classpath entries to use when looking for tests and mutable code.
- *
- * @param path one or more paths
- * @return this operation instance
- * @see #classPathFiles(Collection)
- */
- public PitestOperation classPath(File... path) {
- return classPathFiles(List.of(path));
- }
-
/**
* File with a list of additional classpath elements (one per line).
*
@@ -219,28 +158,6 @@ public class PitestOperation extends AbstractProcessOperation
- * Defaults to {@code false}
- *
- * @param isDryRun {@code true} or {@code false}
- * @return this operation instance
- */
- public PitestOperation dryRun(boolean isDryRun) {
- if (isDryRun) {
- options_.put("--dryRun", TRUE);
- } else {
- options_.put("--dryRun", FALSE);
- }
- return this;
- }
-
/**
* List of globs to match against class names. Matching classes will be excluded from mutation.
*
@@ -321,7 +221,9 @@ public class PitestOperation extends AbstractProcessOperation
- * If no mutableCodePath is supplied PIT will default to considering anything not defined within a jar or zip file
- * as being a candidate for mutation.
- *
- * PIT will always attempt not to mutate test classes even if they are defined on a mutable path.
- *
- * @param path one or one paths
- * @return this operation instance
- * @see #mutableCodePathsPaths(Collection)
- */
- public PitestOperation mutableCodePaths(Path... path) {
- return mutableCodePathsPaths(List.of(path));
- }
-
- /**
- * List of classpaths which should be considered to contain mutable code. If your build maintains separate output
- * directories for tests and production classes this parameter should be set to your code output directory in order
- * to avoid mutating test helper classes etc.
- *
- * If no mutableCodePath is supplied PIT will default to considering anything not defined within a jar or zip file
- * as being a candidate for mutation.
- *
- * PIT will always attempt not to mutate test classes even if they are defined on a mutable path.
- *
- * @param path one or one paths
- * @return this operation instance
- * @see #mutableCodePathsFiles(Collection)
- */
- public PitestOperation mutableCodePaths(File... path) {
- return mutableCodePathsFiles(List.of(path));
+ options_.put("--mutableCodePaths", String.join(",", Arrays.stream(path).filter(this::isNotBlank).toList()));
+ return this;
}
/**
@@ -864,42 +663,6 @@ public class PitestOperation extends AbstractProcessOperation
- * If no mutableCodePath is supplied PIT will default to considering anything not defined within a jar or zip file
- * as being a candidate for mutation.
- *
- * PIT will always attempt not to mutate test classes even if they are defined on a mutable path.
- *
- * @param paths the list of paths
- * @return this operation instance
- * @see #mutableCodePaths(File...)
- */
- public PitestOperation mutableCodePathsFiles(Collection
- * If no mutableCodePath is supplied PIT will default to considering anything not defined within a jar or zip file
- * as being a candidate for mutation.
- *
- * PIT will always attempt not to mutate test classes even if they are defined on a mutable path.
- *
- * @param paths the list of paths
- * @return this operation instance
- * @see #mutableCodePaths(Path...)
- */
- public PitestOperation mutableCodePathsPaths(Collection
@@ -989,34 +752,6 @@ public class PitestOperation extends AbstractProcessOperation
- * Defaults to {@code HTML}.
- *
- * @param outputFormat one or more output formats
- * @return this operation instance
- * @see #outputFormatsFiles(Collection)
- */
- public PitestOperation outputFormats(File... outputFormat) {
- return outputFormatsFiles(List.of(outputFormat));
- }
-
- /**
- * A list of formats in which to write mutation results as the mutations are analysed.
- * Supported formats are {@code HTML}, {@code XML}, {@code CSV}.
- *
- * Defaults to {@code HTML}.
- *
- * @param outputFormat one or more output formats
- * @return this operation instance
- * @see #outputFormatsPaths(Collection)
- */
- public PitestOperation outputFormats(Path... outputFormat) {
- return outputFormatsPaths(List.of(outputFormat));
- }
-
/**
* A list of formats in which to write mutation results as the mutations are analysed.
* Supported formats are {@code HTML}, {@code XML}, {@code CSV}.
@@ -1028,7 +763,9 @@ public class PitestOperation extends AbstractProcessOperation
- * Defaults to {@code HTML}.
- *
- * @param outputFormats the list of output formats
- * @return this operation instance
- * @see #outputFormats(File...)
- */
- public PitestOperation outputFormatsFiles(Collection
- * Defaults to {@code HTML}.
- *
- * @param outputFormats the list of output formats
- * @return this operation instance
- * @see #outputFormats(Path...)
- */
- public PitestOperation outputFormatsPaths(Collection
@@ -1177,29 +844,8 @@ public class PitestOperation extends AbstractProcessOperation
@@ -1269,7 +892,8 @@ public class PitestOperation extends AbstractProcessOperation
- *
- *