diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index 3b6bac7..9231878 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -1,6 +1,6 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true -bld.extensions=com.uwyn.rife2:bld-pitest:0.9.8 +bld.extensions=com.uwyn.rife2:bld-pitest:0.9.7 bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,MAVEN_LOCAL,RIFE2_SNAPSHOTS bld.downloadLocation= bld.sourceDirectories= diff --git a/examples/reports/mutations/com.example/ExamplesLib.java.html b/examples/reports/mutations/com.example/ExamplesLib.java.html index a558328..ad08c1a 100644 --- a/examples/reports/mutations/com.example/ExamplesLib.java.html +++ b/examples/reports/mutations/com.example/ExamplesLib.java.html @@ -155,7 +155,7 @@
- * Default is {@code UTF-8}.
- *
- * @param encoding the encoding
- * @return this operation instance
- */
- public PitestOperation inputEncoding(String encoding) {
- if (isNotBlank(encoding)) {
- options.put("--inputEncoding", encoding);
- }
- return this;
- }
-
/*
* Determines if a string is not blank.
*/
@@ -592,17 +540,6 @@ public class PitestOperation extends AbstractProcessOperation
- * Defaults to {@code gregor}
- *
- * @param engine the engine
- * @return this operation instance
- */
- public PitestOperation mutationEngine(String engine) {
- options.put("--mutationEngine", engine);
- return this;
- }
-
/**
* Mutation score threshold below which the build will fail. This is an integer percent (0-100) that represents the
* fraction of killed mutations out of all mutations.
@@ -671,17 +595,6 @@ public class PitestOperation extends AbstractProcessOperation
* Defaults to {@code HTML}.
@@ -738,7 +651,7 @@ public class PitestOperation extends AbstractProcessOperation
* Defaults to {@code HTML}.
@@ -752,29 +665,6 @@ public class PitestOperation extends AbstractProcessOperation
* This parameter can be used to point PIT to a top level suite or suites. Custom suites such as
* ClassPathSuite are supported.
*
- * @param test one or more tests
+ * @param test one ore more tests
* @return this operation instance
* @see #targetTests(Collection)
*/
@@ -883,7 +773,7 @@ public class PitestOperation extends AbstractProcessOperation
@@ -899,17 +789,6 @@ public class PitestOperation extends AbstractProcessOperation
- * Defaults to {@code DEFAULT}
- *
- * @param verbosity the verbosity
- * @return this operation instance
- */
- public PitestOperation verbosity(String verbosity) {
- options.put("--verbosity", verbosity);
- return this;
- }
}
diff --git a/src/test/java/rife/bld/extension/PitestOperationTest.java b/src/test/java/rife/bld/extension/PitestOperationTest.java
index caf5655..af0e7c1 100644
--- a/src/test/java/rife/bld/extension/PitestOperationTest.java
+++ b/src/test/java/rife/bld/extension/PitestOperationTest.java
@@ -57,121 +57,6 @@ class PitestOperationTest {
assertThat(op.options.get("--avoidCallsTo")).as(AS_LIST).isEqualTo(FOOBAR);
}
- @Test
- void checkAllParameters() {
- var params = List.of(
- "--argLine",
- "--avoidCallsTo",
- "--classPath",
- "--classPathFile",
- "--coverageThreshold",
- "--detectInlinedCode",
- "--excludedClasses",
- "--excludedGroups",
- "--excludedMethods",
- "--excludedRunners",
- "--excludedTestClasses",
- "--exportLineCoverage",
- "--failWhenNoMutations",
- "--features",
- "--fullMutationMatrix",
- "--historyInputLocation",
- "--historyOutputLocation",
- "--includeLaunchClasspath",
- "--includedGroups",
- "--includedTestMethods",
- "--inputEncoding",
- "--jvmArgs",
- "--jvmPath",
- "--maxSurviving",
- "--mutableCodePaths",
- "--mutationEngine",
- "--mutationThreshold",
- "--mutationUnitSize",
- "--mutators",
- "--outputEncoding",
- "--outputFormats",
- "--pluginConfiguration",
- "--projectBase",
- "--reportDir",
- "--skipFailingTests",
- "--sourceDirs",
- "--targetClasses",
- "--targetTests",
- "--testStrengthThreshold",
- "--threads",
- "--timeoutConst",
- "--timeoutFactor",
- "--timestampedReports",
- "--useClasspathJar",
- "--verbose",
- "--verbosity"
- );
-
- var args = new PitestOperation()
- .fromProject(new BaseProject())
- .argLine(FOO)
- .avoidCallsTo(FOO, BAR)
- .classPath(FOO, BAR)
- .classPathFile(FOO)
- .coverageThreshold(0)
- .detectInlinedCode(false)
- .excludedClasses("class")
- .excludedClasses(List.of(FOO, BAR))
- .excludedGroups("group")
- .excludedGroups(List.of(FOO, BAR))
- .excludedMethods("method")
- .excludedMethods(List.of(FOO, BAR))
- .excludedTestClasses("test")
- .excludedRunners("runners")
- .exportLineCoverage(true)
- .failWhenNoMutations(true)
- .features("feature")
- .fullMutationMatrix(true)
- .historyInputLocation("inputLocation")
- .historyOutputLocation("outputLocation")
- .includeLaunchClasspath(true)
- .includedGroups("group")
- .includedTestMethods("method")
- .inputEncoding("encoding")
- .jvmArgs("-XX:+UnlogregckDiagnosticVMOptions")
- .jvmPath("path")
- .maxSurviving(1)
- .mutableCodePaths("codePaths")
- .mutationEngine("engine")
- .mutationThreshold(0)
- .mutationUnitSize(1)
- .mutators(List.of(FOO, BAR))
- .outputEncoding("encoding")
- .outputFormats("json")
- .pluginConfiguration("key", "value")
- .projectBase("base")
- .reportDir("dir")
- .skipFailingTests(true)
- .targetClasses("class")
- .targetTests("test")
- .testStrengthThreshold(0)
- .threads(0)
- .timeoutConst(0)
- .timeoutFactor(0)
- .timestampedReports(true)
- .useClasspathJar(true)
- .verbose(true)
- .verbosity("default")
- .executeConstructProcessCommandList();
-
- for (var p : params) {
- var found = false;
- for (var a : args) {
- if (a.startsWith(p)) {
- found = true;
- break;
- }
- }
- assertThat(found).as(p + " not found.").isTrue();
- }
- }
-
@Test
void classPath() {
var op = new PitestOperation()
@@ -258,25 +143,17 @@ class PitestOperationTest {
assertThat(op.options.get("--excludedMethods")).as(AS_LIST).isEqualTo(FOOBAR);
}
- @Test
- void excludedRunners() {
- var op = new PitestOperation()
- .fromProject(new BaseProject())
- .excludedRunners(FOO);
- assertThat(op.options.get("--excludedRunners")).isEqualTo(FOO);
- }
-
@Test
void excludedTests() {
var op = new PitestOperation()
.fromProject(new BaseProject())
- .excludedTestClasses(FOO, BAR);
- assertThat(op.options.get("--excludedTestClasses")).isEqualTo(FOOBAR);
+ .excludedTests(FOO, BAR);
+ assertThat(op.options.get("--excludedTests")).isEqualTo(FOOBAR);
op = new PitestOperation()
.fromProject(new Project())
- .excludedTestClasses(List.of(FOO, BAR));
- assertThat(op.options.get("--excludedTestClasses")).as("as list").isEqualTo(FOOBAR);
+ .excludedTests(List.of(FOO, BAR));
+ assertThat(op.options.get("--excludedTests")).as("as list").isEqualTo(FOOBAR);
}
@Test
@@ -369,14 +246,6 @@ class PitestOperationTest {
assertThat(op.options.get("--features")).as(AS_LIST).isEqualTo(FOOBAR);
}
- @Test
- void fullMutationMatrix() {
- var op = new PitestOperation()
- .fromProject(new BaseProject())
- .fullMutationMatrix(true);
- assertThat(op.options.get("--fullMutationMatrix")).isEqualTo(TRUE);
- }
-
@Test
void historyInputLocation() {
var op = new PitestOperation()
@@ -419,22 +288,6 @@ class PitestOperationTest {
assertThat(op.options.get("--includedGroups")).as(AS_LIST).isEqualTo(FOOBAR);
}
- @Test
- void includedTestMethods() {
- var op = new PitestOperation()
- .fromProject(new Project())
- .includedTestMethods(FOO);
- assertThat(op.options.get("--includedTestMethods")).isEqualTo(FOO);
- }
-
- @Test
- void inputEncoding() {
- var op = new PitestOperation()
- .fromProject(new BaseProject())
- .inputEncoding(FOO);
- assertThat(op.options.get("--inputEncoding")).isEqualTo(FOO);
- }
-
@Test
void jvmArgs() {
var op = new PitestOperation()
@@ -456,14 +309,6 @@ class PitestOperationTest {
assertThat(op.options.get("--jvmPath")).isEqualTo(FOO);
}
- @Test
- void maxSurviving() {
- var op = new PitestOperation()
- .fromProject(new Project())
- .maxSurviving(1);
- assertThat(op.options.get("--maxSurviving")).isEqualTo("1");
- }
-
@Test
void mutableCodePaths() {
var op = new PitestOperation()
@@ -477,14 +322,6 @@ class PitestOperationTest {
assertThat(op.options.get("--mutableCodePaths")).as(AS_LIST).isEqualTo(FOOBAR);
}
- @Test
- void mutationEngine() {
- var op = new PitestOperation()
- .fromProject(new Project())
- .mutationEngine(FOO);
- assertThat(op.options.get("--mutationEngine")).isEqualTo(FOO);
- }
-
@Test
void mutationThreshold() {
var op = new PitestOperation()
@@ -498,14 +335,6 @@ class PitestOperationTest {
assertThat(op.options.get("--mutationThreshold")).isNull();
}
- @Test
- void mutationUnitSize() {
- var op = new PitestOperation()
- .fromProject(new Project())
- .mutationUnitSize(2);
- assertThat(op.options.get("--mutationUnitSize")).isEqualTo("2");
- }
-
@Test
void mutators() {
var op = new PitestOperation()
@@ -540,22 +369,6 @@ class PitestOperationTest {
assertThat(op.options.get("--outputFormats")).as(AS_LIST).isEqualTo(FOOBAR);
}
- @Test
- void pluginConfiguration() {
- var op = new PitestOperation()
- .fromProject(new Project())
- .pluginConfiguration(FOO, BAR);
- assertThat(op.options.get("--pluginConfiguration")).isEqualTo(FOO + "=" + BAR);
- }
-
- @Test
- void projectBase() {
- var op = new PitestOperation()
- .fromProject(new Project())
- .projectBase(FOO);
- assertThat(op.options.get("--projectBase")).isEqualTo(FOO);
- }
-
@Test
void reportDir() {
var op = new PitestOperation()
@@ -616,14 +429,6 @@ class PitestOperationTest {
assertThat(op.options.get("--targetTests")).as(AS_LIST).isEqualTo(FOOBAR);
}
- @Test
- void testStrengthThreshold() {
- var op = new PitestOperation()
- .fromProject(new Project())
- .testStrengthThreshold(6);
- assertThat(op.options.get("--testStrengthThreshold")).isEqualTo("6");
- }
-
@Test
void threads() {
var op = new PitestOperation()
@@ -686,12 +491,4 @@ class PitestOperationTest {
.verbose(false);
assertThat(op.options.get("--verbose")).isEqualTo(FALSE);
}
-
- @Test
- void verbosity() {
- var op = new PitestOperation()
- .fromProject(new Project())
- .verbosity(FOO);
- assertThat(op.options.get("--verbosity")).isEqualTo(FOO);
- }
}