Minor code cleanups
This commit is contained in:
parent
ecdc379b7b
commit
44e55db532
2 changed files with 156 additions and 147 deletions
|
@ -45,7 +45,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
/**
|
/**
|
||||||
* The PIT options.
|
* The PIT options.
|
||||||
*/
|
*/
|
||||||
protected final Map<String, String> options = new ConcurrentHashMap<>();
|
private final Map<String, String> options_ = new ConcurrentHashMap<>();
|
||||||
private BaseProject project_;
|
private BaseProject project_;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,7 +56,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation argLine(String line) {
|
public PitestOperation argLine(String line) {
|
||||||
if (isNotBlank(line)) {
|
if (isNotBlank(line)) {
|
||||||
options.put("--argLine", line);
|
options_.put("--argLine", line);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #avoidCallsTo(String...)
|
* @see #avoidCallsTo(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation avoidCallsTo(Collection<String> avoidCallsTo) {
|
public PitestOperation avoidCallsTo(Collection<String> avoidCallsTo) {
|
||||||
options.put("--avoidCallsTo", String.join(",", avoidCallsTo.stream().filter(this::isNotBlank).toList()));
|
options_.put("--avoidCallsTo", String.join(",", avoidCallsTo.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #avoidCallsTo(Collection)
|
* @see #avoidCallsTo(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation avoidCallsTo(String... avoidCallTo) {
|
public PitestOperation avoidCallsTo(String... avoidCallTo) {
|
||||||
options.put("--avoidCallsTo", String.join(",", Arrays.stream(avoidCallTo).filter(this::isNotBlank).toList()));
|
options_.put("--avoidCallsTo", String.join(",", Arrays.stream(avoidCallTo).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #classPath(Collection)
|
* @see #classPath(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation classPath(String... path) {
|
public PitestOperation classPath(String... path) {
|
||||||
options.put("--classPath", String.join(",", Arrays.stream(path).filter(this::isNotBlank).toList()));
|
options_.put("--classPath", String.join(",", Arrays.stream(path).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #classPath(String...)
|
* @see #classPath(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation classPath(Collection<String> path) {
|
public PitestOperation classPath(Collection<String> path) {
|
||||||
options.put("--classPath", String.join(",", path.stream().filter(this::isNotBlank).toList()));
|
options_.put("--classPath", String.join(",", path.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation classPathFile(String file) {
|
public PitestOperation classPathFile(String file) {
|
||||||
if (isNotBlank(file)) {
|
if (isNotBlank(file)) {
|
||||||
options.put("--classPathFile", file);
|
options_.put("--classPathFile", file);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation coverageThreshold(int threshold) {
|
public PitestOperation coverageThreshold(int threshold) {
|
||||||
if (threshold >= 0 && threshold <= 100) {
|
if (threshold >= 0 && threshold <= 100) {
|
||||||
options.put("--coverageThreshold", String.valueOf(threshold));
|
options_.put("--coverageThreshold", String.valueOf(threshold));
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -207,9 +207,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation detectInlinedCode(boolean isDetectInlinedCode) {
|
public PitestOperation detectInlinedCode(boolean isDetectInlinedCode) {
|
||||||
if (isDetectInlinedCode) {
|
if (isDetectInlinedCode) {
|
||||||
options.put("--detectInlinedCode", TRUE);
|
options_.put("--detectInlinedCode", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--detectInlinedCode", FALSE);
|
options_.put("--detectInlinedCode", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #excludedClasses(Collection)
|
* @see #excludedClasses(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedClasses(String... excludedClass) {
|
public PitestOperation excludedClasses(String... excludedClass) {
|
||||||
options.put("--excludedClasses",
|
options_.put("--excludedClasses",
|
||||||
String.join(",", Arrays.stream(excludedClass).filter(this::isNotBlank).toList()));
|
String.join(",", Arrays.stream(excludedClass).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #excludedClasses(String...)
|
* @see #excludedClasses(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedClasses(Collection<String> excludedClasses) {
|
public PitestOperation excludedClasses(Collection<String> excludedClasses) {
|
||||||
options.put("--excludedClasses", String.join(",", excludedClasses.stream().filter(this::isNotBlank).toList()));
|
options_.put("--excludedClasses", String.join(",", excludedClasses.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #excludedGroups(Collection)
|
* @see #excludedGroups(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedGroups(String... excludedGroup) {
|
public PitestOperation excludedGroups(String... excludedGroup) {
|
||||||
options.put("--excludedGroups",
|
options_.put("--excludedGroups",
|
||||||
String.join(",", Arrays.stream(excludedGroup).filter(this::isNotBlank).toList()));
|
String.join(",", Arrays.stream(excludedGroup).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #excludedGroups(String...)
|
* @see #excludedGroups(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedGroups(Collection<String> excludedGroups) {
|
public PitestOperation excludedGroups(Collection<String> excludedGroups) {
|
||||||
options.put("--excludedGroups", String.join(",", excludedGroups.stream().filter(this::isNotBlank).toList()));
|
options_.put("--excludedGroups", String.join(",", excludedGroups.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #excludedMethods(Collection)
|
* @see #excludedMethods(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedMethods(String... excludedMethod) {
|
public PitestOperation excludedMethods(String... excludedMethod) {
|
||||||
options.put("--excludedMethods",
|
options_.put("--excludedMethods",
|
||||||
String.join(",", Arrays.stream(excludedMethod).filter(this::isNotBlank).toList()));
|
String.join(",", Arrays.stream(excludedMethod).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #excludedMethods(String...)
|
* @see #excludedMethods(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedMethods(Collection<String> excludedMethods) {
|
public PitestOperation excludedMethods(Collection<String> excludedMethods) {
|
||||||
options.put("--excludedMethods",
|
options_.put("--excludedMethods",
|
||||||
String.join(",", excludedMethods.stream().filter(this::isNotBlank).toList()));
|
String.join(",", excludedMethods.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -299,7 +299,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedRunners(String runners) {
|
public PitestOperation excludedRunners(String runners) {
|
||||||
options.put("--excludedRunners", runners);
|
options_.put("--excludedRunners", runners);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #excludedTestClasses(Collection)
|
* @see #excludedTestClasses(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedTestClasses(String... testClasses) {
|
public PitestOperation excludedTestClasses(String... testClasses) {
|
||||||
options.put("--excludedTestClasses", String.join(",", testClasses));
|
options_.put("--excludedTestClasses", String.join(",", testClasses));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #excludedTestClasses(String...)
|
* @see #excludedTestClasses(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation excludedTestClasses(Collection<String> testClasses) {
|
public PitestOperation excludedTestClasses(Collection<String> testClasses) {
|
||||||
options.put("--excludedTestClasses",
|
options_.put("--excludedTestClasses",
|
||||||
String.join(",", testClasses.stream().filter(this::isNotBlank).toList()));
|
String.join(",", testClasses.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -338,8 +338,8 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
protected List<String> executeConstructProcessCommandList() {
|
protected List<String> executeConstructProcessCommandList() {
|
||||||
if (project_ == null) {
|
if (project_ == null) {
|
||||||
throw new IllegalArgumentException("A project must be specified.");
|
throw new IllegalArgumentException("A project must be specified.");
|
||||||
} else if (!options.containsKey(SOURCE_DIRS)) {
|
} else if (!options_.containsKey(SOURCE_DIRS)) {
|
||||||
options.put(SOURCE_DIRS, project_.srcDirectory().getPath());
|
options_.put(SOURCE_DIRS, project_.srcDirectory().getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<String> args = new ArrayList<>();
|
final List<String> args = new ArrayList<>();
|
||||||
|
@ -351,7 +351,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
project_.buildTestDirectory()));
|
project_.buildTestDirectory()));
|
||||||
args.add("org.pitest.mutationtest.commandline.MutationCoverageReport");
|
args.add("org.pitest.mutationtest.commandline.MutationCoverageReport");
|
||||||
|
|
||||||
options.forEach((k, v) -> {
|
options_.forEach((k, v) -> {
|
||||||
args.add(k);
|
args.add(k);
|
||||||
if (!v.isEmpty()) {
|
if (!v.isEmpty()) {
|
||||||
args.add(v);
|
args.add(v);
|
||||||
|
@ -383,9 +383,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation exportLineCoverage(boolean jsExport) {
|
public PitestOperation exportLineCoverage(boolean jsExport) {
|
||||||
if (jsExport) {
|
if (jsExport) {
|
||||||
options.put("--exportLineCoverage", TRUE);
|
options_.put("--exportLineCoverage", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--exportLineCoverage", FALSE);
|
options_.put("--exportLineCoverage", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -400,9 +400,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation failWhenNoMutations(boolean isFail) {
|
public PitestOperation failWhenNoMutations(boolean isFail) {
|
||||||
if (isFail) {
|
if (isFail) {
|
||||||
options.put("--failWhenNoMutations", TRUE);
|
options_.put("--failWhenNoMutations", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--failWhenNoMutations", FALSE);
|
options_.put("--failWhenNoMutations", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -415,7 +415,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #features(String...)
|
* @see #features(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation features(Collection<String> feature) {
|
public PitestOperation features(Collection<String> feature) {
|
||||||
options.put("--features", String.join(",", feature.stream().filter(this::isNotBlank).toList()));
|
options_.put("--features", String.join(",", feature.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #features(Collection)
|
* @see #features(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation features(String... feature) {
|
public PitestOperation features(String... feature) {
|
||||||
options.put("--features", String.join(",", Arrays.stream(feature).filter(this::isNotBlank).toList()));
|
options_.put("--features", String.join(",", Arrays.stream(feature).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,9 +439,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation fullMutationMatrix(boolean isFullMutationMatrix) {
|
public PitestOperation fullMutationMatrix(boolean isFullMutationMatrix) {
|
||||||
if (isFullMutationMatrix) {
|
if (isFullMutationMatrix) {
|
||||||
options.put("--fullMutationMatrix", TRUE);
|
options_.put("--fullMutationMatrix", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--fullMutationMatrix", FALSE);
|
options_.put("--fullMutationMatrix", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -454,7 +454,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation historyInputLocation(String path) {
|
public PitestOperation historyInputLocation(String path) {
|
||||||
if (isNotBlank(path)) {
|
if (isNotBlank(path)) {
|
||||||
options.put("--historyInputLocation", path);
|
options_.put("--historyInputLocation", path);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -468,7 +468,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation historyOutputLocation(String path) {
|
public PitestOperation historyOutputLocation(String path) {
|
||||||
if (isNotBlank(path)) {
|
if (isNotBlank(path)) {
|
||||||
options.put("--historyOutputLocation", path);
|
options_.put("--historyOutputLocation", path);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -485,9 +485,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation includeLaunchClasspath(boolean isLaunchClasspath) {
|
public PitestOperation includeLaunchClasspath(boolean isLaunchClasspath) {
|
||||||
if (isLaunchClasspath) {
|
if (isLaunchClasspath) {
|
||||||
options.put("--includeLaunchClasspath", TRUE);
|
options_.put("--includeLaunchClasspath", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--includeLaunchClasspath", FALSE);
|
options_.put("--includeLaunchClasspath", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -501,7 +501,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #includedGroups(Collection)
|
* @see #includedGroups(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation includedGroups(String... includedGroup) {
|
public PitestOperation includedGroups(String... includedGroup) {
|
||||||
options.put("--includedGroups",
|
options_.put("--includedGroups",
|
||||||
String.join(",", Arrays.stream(includedGroup).filter(this::isNotBlank).toList()));
|
String.join(",", Arrays.stream(includedGroup).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -515,7 +515,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #includedGroups(String...)
|
* @see #includedGroups(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation includedGroups(Collection<String> includedGroups) {
|
public PitestOperation includedGroups(Collection<String> includedGroups) {
|
||||||
options.put("--includedGroups", String.join(",", includedGroups.stream().filter(this::isNotBlank).toList()));
|
options_.put("--includedGroups", String.join(",", includedGroups.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation includedTestMethods(String testMethod) {
|
public PitestOperation includedTestMethods(String testMethod) {
|
||||||
options.put("--includedTestMethods", testMethod);
|
options_.put("--includedTestMethods", testMethod);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -540,7 +540,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation inputEncoding(String encoding) {
|
public PitestOperation inputEncoding(String encoding) {
|
||||||
if (isNotBlank(encoding)) {
|
if (isNotBlank(encoding)) {
|
||||||
options.put("--inputEncoding", encoding);
|
options_.put("--inputEncoding", encoding);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -561,7 +561,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #jvmArgs(Collection)
|
* @see #jvmArgs(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation jvmArgs(String... args) {
|
public PitestOperation jvmArgs(String... args) {
|
||||||
options.put("--jvmArgs", String.join(",", Arrays.stream(args).filter(this::isNotBlank).toList()));
|
options_.put("--jvmArgs", String.join(",", Arrays.stream(args).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,7 +574,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #jvmArgs(String...)
|
* @see #jvmArgs(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation jvmArgs(Collection<String> args) {
|
public PitestOperation jvmArgs(Collection<String> args) {
|
||||||
options.put("--jvmArgs", String.join(",", args.stream().filter(this::isNotBlank).toList()));
|
options_.put("--jvmArgs", String.join(",", args.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation jvmPath(String path) {
|
public PitestOperation jvmPath(String path) {
|
||||||
if (isNotBlank(path)) {
|
if (isNotBlank(path)) {
|
||||||
options.put("--jvmPath", path);
|
options_.put("--jvmPath", path);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -599,7 +599,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation maxMutationsPerClass(int maxMutationsPerClass) {
|
public PitestOperation maxMutationsPerClass(int maxMutationsPerClass) {
|
||||||
options.put("--maxMutationsPerClass", String.valueOf(maxMutationsPerClass));
|
options_.put("--maxMutationsPerClass", String.valueOf(maxMutationsPerClass));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,7 +610,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation maxSurviving(int maxSurviving) {
|
public PitestOperation maxSurviving(int maxSurviving) {
|
||||||
options.put("--maxSurviving", String.valueOf(maxSurviving));
|
options_.put("--maxSurviving", String.valueOf(maxSurviving));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -629,7 +629,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #mutableCodePaths(Collection)
|
* @see #mutableCodePaths(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation mutableCodePaths(String... path) {
|
public PitestOperation mutableCodePaths(String... path) {
|
||||||
options.put("--mutableCodePaths", String.join(",", Arrays.stream(path).filter(this::isNotBlank).toList()));
|
options_.put("--mutableCodePaths", String.join(",", Arrays.stream(path).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,7 +648,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #mutableCodePaths(String...)
|
* @see #mutableCodePaths(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation mutableCodePaths(Collection<String> paths) {
|
public PitestOperation mutableCodePaths(Collection<String> paths) {
|
||||||
options.put("--mutableCodePaths", String.join(",", paths.stream().filter(this::isNotBlank).toList()));
|
options_.put("--mutableCodePaths", String.join(",", paths.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -661,7 +661,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation mutationEngine(String engine) {
|
public PitestOperation mutationEngine(String engine) {
|
||||||
options.put("--mutationEngine", engine);
|
options_.put("--mutationEngine", engine);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -677,7 +677,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation mutationThreshold(int threshold) {
|
public PitestOperation mutationThreshold(int threshold) {
|
||||||
if (threshold >= 0 && threshold <= 100) {
|
if (threshold >= 0 && threshold <= 100) {
|
||||||
options.put("--mutationThreshold", String.valueOf(threshold));
|
options_.put("--mutationThreshold", String.valueOf(threshold));
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -689,7 +689,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation mutationUnitSize(int size) {
|
public PitestOperation mutationUnitSize(int size) {
|
||||||
options.put("--mutationUnitSize", String.valueOf(size));
|
options_.put("--mutationUnitSize", String.valueOf(size));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -701,7 +701,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #mutators(Collection)
|
* @see #mutators(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation mutators(String... mutator) {
|
public PitestOperation mutators(String... mutator) {
|
||||||
options.put("--mutators", String.join(",", Arrays.stream(mutator).filter(this::isNotBlank).toList()));
|
options_.put("--mutators", String.join(",", Arrays.stream(mutator).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -713,10 +713,19 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #mutators(String...)
|
* @see #mutators(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation mutators(Collection<String> mutators) {
|
public PitestOperation mutators(Collection<String> mutators) {
|
||||||
options.put("--mutators", String.join(",", mutators.stream().filter(this::isNotBlank).toList()));
|
options_.put("--mutators", String.join(",", mutators.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the PIT options.
|
||||||
|
*
|
||||||
|
* @return the map of options
|
||||||
|
*/
|
||||||
|
public Map<String, String> options() {
|
||||||
|
return options_;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output encoding.
|
* Output encoding.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -727,7 +736,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation outputEncoding(String encoding) {
|
public PitestOperation outputEncoding(String encoding) {
|
||||||
if (isNotBlank(encoding)) {
|
if (isNotBlank(encoding)) {
|
||||||
options.put("--outputEncoding", encoding);
|
options_.put("--outputEncoding", encoding);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -743,7 +752,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #outputFormats(Collection)
|
* @see #outputFormats(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation outputFormats(String... outputFormat) {
|
public PitestOperation outputFormats(String... outputFormat) {
|
||||||
options.put("--outputFormats",
|
options_.put("--outputFormats",
|
||||||
String.join(",", Arrays.stream(outputFormat).filter(this::isNotBlank).toList()));
|
String.join(",", Arrays.stream(outputFormat).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -759,7 +768,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #outputFormats(String...)
|
* @see #outputFormats(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation outputFormats(Collection<String> outputFormats) {
|
public PitestOperation outputFormats(Collection<String> outputFormats) {
|
||||||
options.put("--outputFormats", String.join(",", outputFormats.stream().filter(this::isNotBlank).toList()));
|
options_.put("--outputFormats", String.join(",", outputFormats.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -771,7 +780,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation pluginConfiguration(String key, String value) {
|
public PitestOperation pluginConfiguration(String key, String value) {
|
||||||
options.put("--pluginConfiguration", key + '=' + value);
|
options_.put("--pluginConfiguration", key + '=' + value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -782,7 +791,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operations instance
|
* @return this operations instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation projectBase(String file) {
|
public PitestOperation projectBase(String file) {
|
||||||
options.put("--projectBase", file);
|
options_.put("--projectBase", file);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -794,7 +803,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation reportDir(String dir) {
|
public PitestOperation reportDir(String dir) {
|
||||||
if (isNotBlank(dir)) {
|
if (isNotBlank(dir)) {
|
||||||
options.put("--reportDir", dir);
|
options_.put("--reportDir", dir);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -809,9 +818,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation skipFailingTests(boolean isSkipFail) {
|
public PitestOperation skipFailingTests(boolean isSkipFail) {
|
||||||
if (isSkipFail) {
|
if (isSkipFail) {
|
||||||
options.put("--skipFailingTests", TRUE);
|
options_.put("--skipFailingTests", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--skipFailingTests", FALSE);
|
options_.put("--skipFailingTests", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -824,7 +833,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #sourceDirs(Collection)
|
* @see #sourceDirs(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation sourceDirs(String... dir) {
|
public PitestOperation sourceDirs(String... dir) {
|
||||||
options.put(SOURCE_DIRS, String.join(",", Arrays.stream(dir).filter(this::isNotBlank).toList()));
|
options_.put(SOURCE_DIRS, String.join(",", Arrays.stream(dir).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -836,7 +845,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #sourceDirs(String...)
|
* @see #sourceDirs(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation sourceDirs(Collection<String> dirs) {
|
public PitestOperation sourceDirs(Collection<String> dirs) {
|
||||||
options.put(SOURCE_DIRS, String.join(",", dirs.stream().filter(this::isNotBlank).toList()));
|
options_.put(SOURCE_DIRS, String.join(",", dirs.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -854,7 +863,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #targetClasses(Collection)
|
* @see #targetClasses(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation targetClasses(Collection<String> targetClass) {
|
public PitestOperation targetClasses(Collection<String> targetClass) {
|
||||||
options.put("--targetClasses", String.join(",", targetClass.stream().filter(this::isNotBlank).toList()));
|
options_.put("--targetClasses", String.join(",", targetClass.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -872,7 +881,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #targetClasses(String...)
|
* @see #targetClasses(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation targetClasses(String... targetClass) {
|
public PitestOperation targetClasses(String... targetClass) {
|
||||||
options.put("--targetClasses", String.join(",", Arrays.stream(targetClass).filter(this::isNotBlank).toList()));
|
options_.put("--targetClasses", String.join(",", Arrays.stream(targetClass).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -889,7 +898,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #targetTests(Collection)
|
* @see #targetTests(Collection)
|
||||||
*/
|
*/
|
||||||
public PitestOperation targetTests(String... test) {
|
public PitestOperation targetTests(String... test) {
|
||||||
options.put("--targetTests", String.join(",", Arrays.stream(test).filter(this::isNotBlank).toList()));
|
options_.put("--targetTests", String.join(",", Arrays.stream(test).filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -906,7 +915,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @see #targetTests(String...)
|
* @see #targetTests(String...)
|
||||||
*/
|
*/
|
||||||
public PitestOperation targetTests(Collection<String> tests) {
|
public PitestOperation targetTests(Collection<String> tests) {
|
||||||
options.put("--targetTests", String.join(",", tests.stream().filter(this::isNotBlank).toList()));
|
options_.put("--targetTests", String.join(",", tests.stream().filter(this::isNotBlank).toList()));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -917,7 +926,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation testStrengthThreshold(int threshold) {
|
public PitestOperation testStrengthThreshold(int threshold) {
|
||||||
options.put("--testStrengthThreshold", String.valueOf(threshold));
|
options_.put("--testStrengthThreshold", String.valueOf(threshold));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -928,7 +937,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation threads(int threads) {
|
public PitestOperation threads(int threads) {
|
||||||
options.put("--threads", String.valueOf(threads));
|
options_.put("--threads", String.valueOf(threads));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -942,7 +951,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation timeoutConst(int factor) {
|
public PitestOperation timeoutConst(int factor) {
|
||||||
options.put("--timeoutConst", String.valueOf(factor));
|
options_.put("--timeoutConst", String.valueOf(factor));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -955,7 +964,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation timeoutFactor(double factor) {
|
public PitestOperation timeoutFactor(double factor) {
|
||||||
options.put("--timeoutFactor", String.valueOf(factor));
|
options_.put("--timeoutFactor", String.valueOf(factor));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -970,9 +979,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation timestampedReports(boolean isTimestamped) {
|
public PitestOperation timestampedReports(boolean isTimestamped) {
|
||||||
if (isTimestamped) {
|
if (isTimestamped) {
|
||||||
options.put("--timestampedReports", TRUE);
|
options_.put("--timestampedReports", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--timestampedReports", FALSE);
|
options_.put("--timestampedReports", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -987,9 +996,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation useClasspathJar(boolean isUseClasspathJar) {
|
public PitestOperation useClasspathJar(boolean isUseClasspathJar) {
|
||||||
if (isUseClasspathJar) {
|
if (isUseClasspathJar) {
|
||||||
options.put("--useClasspathJar", TRUE);
|
options_.put("--useClasspathJar", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--useClasspathJar", FALSE);
|
options_.put("--useClasspathJar", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -1004,9 +1013,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
*/
|
*/
|
||||||
public PitestOperation verbose(boolean isVerbose) {
|
public PitestOperation verbose(boolean isVerbose) {
|
||||||
if (isVerbose) {
|
if (isVerbose) {
|
||||||
options.put("--verbose", TRUE);
|
options_.put("--verbose", TRUE);
|
||||||
} else {
|
} else {
|
||||||
options.put("--verbose", FALSE);
|
options_.put("--verbose", FALSE);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -1020,7 +1029,7 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
|
||||||
* @return this operation instance
|
* @return this operation instance
|
||||||
*/
|
*/
|
||||||
public PitestOperation verbosity(String verbosity) {
|
public PitestOperation verbosity(String verbosity) {
|
||||||
options.put("--verbosity", verbosity);
|
options_.put("--verbosity", verbosity);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.argLine(FOO);
|
.argLine(FOO);
|
||||||
assertThat(op.options.get("--argLine")).isEqualTo(FOO);
|
assertThat(op.options().get("--argLine")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -50,12 +50,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.avoidCallsTo(FOO, BAR);
|
.avoidCallsTo(FOO, BAR);
|
||||||
assertThat(op.options.get("--avoidCallsTo")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--avoidCallsTo")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.avoidCallsTo(List.of(FOO, BAR));
|
.avoidCallsTo(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--avoidCallsTo")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--avoidCallsTo")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -134,12 +134,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.classPath(FOO, BAR);
|
.classPath(FOO, BAR);
|
||||||
assertThat(op.options.get("--classPath")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--classPath")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.classPath(List.of(FOO, BAR));
|
.classPath(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--classPath")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--classPath")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -147,7 +147,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.classPathFile(FOO);
|
.classPathFile(FOO);
|
||||||
assertThat(op.options.get("--classPathFile")).isEqualTo(FOO);
|
assertThat(op.options().get("--classPathFile")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -155,12 +155,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.coverageThreshold(3);
|
.coverageThreshold(3);
|
||||||
assertThat(op.options.get("--coverageThreshold")).isEqualTo("3");
|
assertThat(op.options().get("--coverageThreshold")).isEqualTo("3");
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.coverageThreshold(101);
|
.coverageThreshold(101);
|
||||||
assertThat(op.options.get("--coverageThreshold")).isNull();
|
assertThat(op.options().get("--coverageThreshold")).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -168,12 +168,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.detectInlinedCode(true);
|
.detectInlinedCode(true);
|
||||||
assertThat(op.options.get("--detectInlinedCode")).isEqualTo(TRUE);
|
assertThat(op.options().get("--detectInlinedCode")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.detectInlinedCode(false);
|
.detectInlinedCode(false);
|
||||||
assertThat(op.options.get("--detectInlinedCode")).isEqualTo(FALSE);
|
assertThat(op.options().get("--detectInlinedCode")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -181,12 +181,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedClasses(FOO, BAR);
|
.excludedClasses(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedClasses")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedClasses")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedClasses(Set.of(FOO, BAR));
|
.excludedClasses(Set.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedClasses")).as("as set").contains(FOO).contains(BAR).contains(",");
|
assertThat(op.options().get("--excludedClasses")).as("as set").contains(FOO).contains(BAR).contains(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -194,12 +194,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedGroups(FOO, BAR);
|
.excludedGroups(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedGroups")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedGroups")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedGroups(List.of(FOO, BAR));
|
.excludedGroups(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -207,12 +207,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedMethods(FOO, BAR);
|
.excludedMethods(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedMethods")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedMethods")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedMethods(List.of(FOO, BAR));
|
.excludedMethods(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedMethods")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedMethods")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -220,7 +220,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedRunners(FOO);
|
.excludedRunners(FOO);
|
||||||
assertThat(op.options.get("--excludedRunners")).isEqualTo(FOO);
|
assertThat(op.options().get("--excludedRunners")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -228,12 +228,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.excludedTestClasses(FOO, BAR);
|
.excludedTestClasses(FOO, BAR);
|
||||||
assertThat(op.options.get("--excludedTestClasses")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedTestClasses")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.excludedTestClasses(List.of(FOO, BAR));
|
.excludedTestClasses(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--excludedTestClasses")).as("as list").isEqualTo(FOOBAR);
|
assertThat(op.options().get("--excludedTestClasses")).as("as list").isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -292,12 +292,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.exportLineCoverage(true);
|
.exportLineCoverage(true);
|
||||||
assertThat(op.options.get("--exportLineCoverage")).isEqualTo(TRUE);
|
assertThat(op.options().get("--exportLineCoverage")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.exportLineCoverage(false);
|
.exportLineCoverage(false);
|
||||||
assertThat(op.options.get("--exportLineCoverage")).isEqualTo(FALSE);
|
assertThat(op.options().get("--exportLineCoverage")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -305,12 +305,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.failWhenNoMutations(true);
|
.failWhenNoMutations(true);
|
||||||
assertThat(op.options.get("--failWhenNoMutations")).isEqualTo(TRUE);
|
assertThat(op.options().get("--failWhenNoMutations")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.failWhenNoMutations(false);
|
.failWhenNoMutations(false);
|
||||||
assertThat(op.options.get("--failWhenNoMutations")).isEqualTo(FALSE);
|
assertThat(op.options().get("--failWhenNoMutations")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -318,12 +318,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.features(FOO, BAR);
|
.features(FOO, BAR);
|
||||||
assertThat(op.options.get("--features")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--features")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.features(List.of(FOO, BAR));
|
.features(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--features")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--features")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -331,7 +331,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.fullMutationMatrix(true);
|
.fullMutationMatrix(true);
|
||||||
assertThat(op.options.get("--fullMutationMatrix")).isEqualTo(TRUE);
|
assertThat(op.options().get("--fullMutationMatrix")).isEqualTo(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -339,7 +339,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.historyInputLocation(FOO);
|
.historyInputLocation(FOO);
|
||||||
assertThat(op.options.get("--historyInputLocation")).isEqualTo(FOO);
|
assertThat(op.options().get("--historyInputLocation")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -347,7 +347,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.historyOutputLocation(FOO);
|
.historyOutputLocation(FOO);
|
||||||
assertThat(op.options.get("--historyOutputLocation")).isEqualTo(FOO);
|
assertThat(op.options().get("--historyOutputLocation")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -355,12 +355,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.includeLaunchClasspath(true);
|
.includeLaunchClasspath(true);
|
||||||
assertThat(op.options.get("--includeLaunchClasspath")).isEqualTo(TRUE);
|
assertThat(op.options().get("--includeLaunchClasspath")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.includeLaunchClasspath(false);
|
.includeLaunchClasspath(false);
|
||||||
assertThat(op.options.get("--includeLaunchClasspath")).isEqualTo(FALSE);
|
assertThat(op.options().get("--includeLaunchClasspath")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -368,12 +368,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.includedGroups(FOO, BAR);
|
.includedGroups(FOO, BAR);
|
||||||
assertThat(op.options.get("--includedGroups")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--includedGroups")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.includedGroups(List.of(FOO, BAR));
|
.includedGroups(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--includedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--includedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -381,7 +381,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.includedTestMethods(FOO);
|
.includedTestMethods(FOO);
|
||||||
assertThat(op.options.get("--includedTestMethods")).isEqualTo(FOO);
|
assertThat(op.options().get("--includedTestMethods")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -389,7 +389,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.inputEncoding(FOO);
|
.inputEncoding(FOO);
|
||||||
assertThat(op.options.get("--inputEncoding")).isEqualTo(FOO);
|
assertThat(op.options().get("--inputEncoding")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -397,12 +397,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.jvmArgs(FOO, BAR);
|
.jvmArgs(FOO, BAR);
|
||||||
assertThat(op.options.get("--jvmArgs")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--jvmArgs")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.jvmArgs(List.of(FOO, BAR));
|
.jvmArgs(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--jvmArgs")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--jvmArgs")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -410,7 +410,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.jvmPath(FOO);
|
.jvmPath(FOO);
|
||||||
assertThat(op.options.get("--jvmPath")).isEqualTo(FOO);
|
assertThat(op.options().get("--jvmPath")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -418,7 +418,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.maxMutationsPerClass(12);
|
.maxMutationsPerClass(12);
|
||||||
assertThat(op.options.get("--maxMutationsPerClass")).isEqualTo("12");
|
assertThat(op.options().get("--maxMutationsPerClass")).isEqualTo("12");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -426,7 +426,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.maxSurviving(1);
|
.maxSurviving(1);
|
||||||
assertThat(op.options.get("--maxSurviving")).isEqualTo("1");
|
assertThat(op.options().get("--maxSurviving")).isEqualTo("1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -434,12 +434,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.mutableCodePaths(FOO, BAR);
|
.mutableCodePaths(FOO, BAR);
|
||||||
assertThat(op.options.get("--mutableCodePaths")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--mutableCodePaths")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.mutableCodePaths(List.of(FOO, BAR));
|
.mutableCodePaths(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--mutableCodePaths")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--mutableCodePaths")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -447,7 +447,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.mutationEngine(FOO);
|
.mutationEngine(FOO);
|
||||||
assertThat(op.options.get("--mutationEngine")).isEqualTo(FOO);
|
assertThat(op.options().get("--mutationEngine")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -455,12 +455,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.mutationThreshold(3);
|
.mutationThreshold(3);
|
||||||
assertThat(op.options.get("--mutationThreshold")).isEqualTo("3");
|
assertThat(op.options().get("--mutationThreshold")).isEqualTo("3");
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.mutationThreshold(101);
|
.mutationThreshold(101);
|
||||||
assertThat(op.options.get("--mutationThreshold")).isNull();
|
assertThat(op.options().get("--mutationThreshold")).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -468,7 +468,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.mutationUnitSize(2);
|
.mutationUnitSize(2);
|
||||||
assertThat(op.options.get("--mutationUnitSize")).isEqualTo("2");
|
assertThat(op.options().get("--mutationUnitSize")).isEqualTo("2");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -476,12 +476,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.mutators(FOO, BAR);
|
.mutators(FOO, BAR);
|
||||||
assertThat(op.options.get("--mutators")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--mutators")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.mutators(List.of(FOO, BAR));
|
.mutators(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--mutators")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--mutators")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -489,7 +489,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.outputEncoding(FOO);
|
.outputEncoding(FOO);
|
||||||
assertThat(op.options.get("--outputEncoding")).isEqualTo(FOO);
|
assertThat(op.options().get("--outputEncoding")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -497,12 +497,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.outputFormats(FOO, BAR);
|
.outputFormats(FOO, BAR);
|
||||||
assertThat(op.options.get("--outputFormats")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--outputFormats")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.outputFormats(List.of(FOO, BAR));
|
.outputFormats(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--outputFormats")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--outputFormats")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -510,7 +510,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.pluginConfiguration(FOO, BAR);
|
.pluginConfiguration(FOO, BAR);
|
||||||
assertThat(op.options.get("--pluginConfiguration")).isEqualTo(FOO + "=" + BAR);
|
assertThat(op.options().get("--pluginConfiguration")).isEqualTo(FOO + "=" + BAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -518,7 +518,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.projectBase(FOO);
|
.projectBase(FOO);
|
||||||
assertThat(op.options.get("--projectBase")).isEqualTo(FOO);
|
assertThat(op.options().get("--projectBase")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -526,7 +526,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.reportDir(FOO);
|
.reportDir(FOO);
|
||||||
assertThat(op.options.get("--reportDir")).isEqualTo(FOO);
|
assertThat(op.options().get("--reportDir")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -534,12 +534,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.skipFailingTests(true);
|
.skipFailingTests(true);
|
||||||
assertThat(op.options.get("--skipFailingTests")).isEqualTo(TRUE);
|
assertThat(op.options().get("--skipFailingTests")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.skipFailingTests(false);
|
.skipFailingTests(false);
|
||||||
assertThat(op.options.get("--skipFailingTests")).isEqualTo(FALSE);
|
assertThat(op.options().get("--skipFailingTests")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -547,12 +547,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.sourceDirs(FOO, BAR);
|
.sourceDirs(FOO, BAR);
|
||||||
assertThat(op.options.get(SOURCE_DIRS)).isEqualTo(FOOBAR);
|
assertThat(op.options().get(SOURCE_DIRS)).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.sourceDirs(List.of(FOO, BAR));
|
.sourceDirs(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get(SOURCE_DIRS)).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get(SOURCE_DIRS)).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -560,12 +560,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.targetClasses(FOO, BAR);
|
.targetClasses(FOO, BAR);
|
||||||
assertThat(op.options.get("--targetClasses")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--targetClasses")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.targetClasses(List.of(FOO, BAR));
|
.targetClasses(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--targetClasses")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--targetClasses")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -573,12 +573,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.targetTests(FOO, BAR);
|
.targetTests(FOO, BAR);
|
||||||
assertThat(op.options.get("--targetTests")).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--targetTests")).isEqualTo(FOOBAR);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.targetTests(List.of(FOO, BAR));
|
.targetTests(List.of(FOO, BAR));
|
||||||
assertThat(op.options.get("--targetTests")).as(AS_LIST).isEqualTo(FOOBAR);
|
assertThat(op.options().get("--targetTests")).as(AS_LIST).isEqualTo(FOOBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -586,7 +586,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.testStrengthThreshold(6);
|
.testStrengthThreshold(6);
|
||||||
assertThat(op.options.get("--testStrengthThreshold")).isEqualTo("6");
|
assertThat(op.options().get("--testStrengthThreshold")).isEqualTo("6");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -594,7 +594,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.threads(3);
|
.threads(3);
|
||||||
assertThat(op.options.get("--threads")).isEqualTo("3");
|
assertThat(op.options().get("--threads")).isEqualTo("3");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -602,7 +602,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.timeoutConst(300);
|
.timeoutConst(300);
|
||||||
assertThat(op.options.get("--timeoutConst")).isEqualTo("300");
|
assertThat(op.options().get("--timeoutConst")).isEqualTo("300");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -610,7 +610,7 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.timeoutFactor(5.25);
|
.timeoutFactor(5.25);
|
||||||
assertThat(op.options.get("--timeoutFactor")).isEqualTo("5.25");
|
assertThat(op.options().get("--timeoutFactor")).isEqualTo("5.25");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -618,12 +618,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.timestampedReports(true);
|
.timestampedReports(true);
|
||||||
assertThat(op.options.get("--timestampedReports")).isEqualTo(TRUE);
|
assertThat(op.options().get("--timestampedReports")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.timestampedReports(false);
|
.timestampedReports(false);
|
||||||
assertThat(op.options.get("--timestampedReports")).isEqualTo(FALSE);
|
assertThat(op.options().get("--timestampedReports")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -631,12 +631,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.useClasspathJar(true);
|
.useClasspathJar(true);
|
||||||
assertThat(op.options.get("--useClasspathJar")).isEqualTo(TRUE);
|
assertThat(op.options().get("--useClasspathJar")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.useClasspathJar(false);
|
.useClasspathJar(false);
|
||||||
assertThat(op.options.get("--useClasspathJar")).isEqualTo(FALSE);
|
assertThat(op.options().get("--useClasspathJar")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -644,12 +644,12 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new BaseProject())
|
.fromProject(new BaseProject())
|
||||||
.verbose(true);
|
.verbose(true);
|
||||||
assertThat(op.options.get("--verbose")).isEqualTo(TRUE);
|
assertThat(op.options().get("--verbose")).isEqualTo(TRUE);
|
||||||
|
|
||||||
op = new PitestOperation()
|
op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.verbose(false);
|
.verbose(false);
|
||||||
assertThat(op.options.get("--verbose")).isEqualTo(FALSE);
|
assertThat(op.options().get("--verbose")).isEqualTo(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -657,6 +657,6 @@ class PitestOperationTest {
|
||||||
var op = new PitestOperation()
|
var op = new PitestOperation()
|
||||||
.fromProject(new Project())
|
.fromProject(new Project())
|
||||||
.verbosity(FOO);
|
.verbosity(FOO);
|
||||||
assertThat(op.options.get("--verbosity")).isEqualTo(FOO);
|
assertThat(op.options().get("--verbosity")).isEqualTo(FOO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue