Skip to content

Commit

Permalink
Merge pull request #992 from hcoles/cleanup/testPlugin
Browse files Browse the repository at this point in the history
remove defunct testPlugin parameter
  • Loading branch information
hcoles authored Mar 3, 2022
2 parents 9158e4d + 3fd8cda commit 3ac2176
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 63 deletions.
4 changes: 0 additions & 4 deletions pitest-ant/src/main/java/org/pitest/ant/PitestTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,6 @@ public void setMutableCodePaths(final String glob) {
setOption(ConfigOption.CODE_PATHS, glob);
}

public void setTestPlugin(final String value) {
this.setOption(ConfigOption.TEST_PLUGIN, value);
}

public void setIncludedGroups(final String value) {
this.setOption(ConfigOption.INCLUDED_GROUPS, value);
}
Expand Down
9 changes: 1 addition & 8 deletions pitest-ant/src/test/java/org/pitest/ant/PitestTaskTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,7 @@ public void shouldPassMutableCodePathsToJavaTask() {
this.pitestTask.execute(this.java);
verify(this.arg).setValue("--mutableCodePaths=foo");
}

@Test
public void shouldPassTestPluginToJavaTask() {
this.pitestTask.setTestPlugin("junit");
this.pitestTask.execute(this.java);
verify(this.arg).setValue("--testPlugin=junit");
}


@Test
public void shouldOnlyPassTheSpecifiedOptions() throws Exception {
this.pitestTask.setVerbose("true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
import static org.pitest.mutationtest.config.ConfigOption.SOURCE_DIR;
import static org.pitest.mutationtest.config.ConfigOption.TARGET_CLASSES;
import static org.pitest.mutationtest.config.ConfigOption.TEST_FILTER;
import static org.pitest.mutationtest.config.ConfigOption.TEST_PLUGIN;
import static org.pitest.mutationtest.config.ConfigOption.TEST_STRENGTH_THRESHOLD;
import static org.pitest.mutationtest.config.ConfigOption.THREADS;
import static org.pitest.mutationtest.config.ConfigOption.TIMEOUT_CONST;
Expand Down Expand Up @@ -134,7 +133,6 @@ public class OptionsParser {
private final ArgumentAcceptingOptionSpec<Boolean> exportLineCoverageSpec;
private final OptionSpec<String> javaExecutable;
private final OptionSpec<KeyValuePair> pluginPropertiesSpec;
private final OptionSpec<String> testPluginSpec;
private final ArgumentAcceptingOptionSpec<Boolean> includeLaunchClasspathSpec;
private final ArgumentAcceptingOptionSpec<Boolean> useClasspathJarSpec;

Expand All @@ -145,12 +143,6 @@ public OptionsParser(Predicate<String> dependencyFilter) {
this.parser = new OptionParser();
this.parser.acceptsAll(Arrays.asList("h", "?"), "show help");

this.testPluginSpec = parserAccepts(TEST_PLUGIN)
.withRequiredArg()
.ofType(String.class)
.defaultsTo("junit")
.describedAs("this parameter is ignored and will be removed in a future release");

this.reportDirSpec = parserAccepts(REPORT_DIR).withRequiredArg()
.describedAs("directory to create report folder in").required();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@

public enum ConfigOption {

/**
* The test plugin to use
*/
TEST_PLUGIN("testPlugin"),

/**
* The directory to write report sot
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,7 @@ public class AbstractPitMojo extends AbstractMojo {
private final PluginServices plugins;

// Concrete List types declared for all fields to work around maven 2 bug

/**
* Test plugin to use
*/
// No longer used, retained here temporarily for backwards compatibility in buildscripts
@Parameter(property = "testPlugin", defaultValue = "")
private String testPlugin;


/**
* Classes to include in mutation test
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,7 @@ public void testParsesCustomProperties() {
assertEquals("foo", actual.getFreeFormProperties().get("foo"));
assertEquals("bar", actual.getFreeFormProperties().get("bar"));
}

public void testDoesNotErrorIfDefunctTestPluginArgumentSupplied() {
parseConfig("<testPlugin>testng</testPlugin>");
}


public void testDoesNotUseClasspathJarByDefault() {
final ReportOptions actual = parseConfig("");
assertFalse(actual.useClasspathJar());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
public class RunDecisionTest {

@Test
public void shouldRunIfThereAreNoReasonsWhyNot() throws Exception {
public void shouldRunIfThereAreNoReasonsWhyNot() {
AbstractPitMojo.RunDecision rd = new AbstractPitMojo.RunDecision();

assertThat(rd.getReasons()).isEmpty();
assertThat(rd.shouldRun()).isTrue();
}

@Test
public void shouldNotRunIfThereIsAReasonsWhyNot() throws Exception {
public void shouldNotRunIfThereIsAReasonsWhyNot() {
AbstractPitMojo.RunDecision rd = new AbstractPitMojo.RunDecision();

rd.addReason("Today is Sunday");
Expand All @@ -25,7 +25,7 @@ public void shouldNotRunIfThereIsAReasonsWhyNot() throws Exception {
}

@Test
public void addReasonAddsReason() throws Exception {
public void addReasonAddsReason() {
AbstractPitMojo.RunDecision rd = new AbstractPitMojo.RunDecision();

rd.addReason("Today is Sunday");
Expand All @@ -34,7 +34,7 @@ public void addReasonAddsReason() throws Exception {
}

@Test
public void getReasonsReturnsAllReasons() throws Exception {
public void getReasonsReturnsAllReasons() {
AbstractPitMojo.RunDecision rd = new AbstractPitMojo.RunDecision();

rd.addReason("Today is Monday");
Expand Down
21 changes: 0 additions & 21 deletions pitest/src/main/java/org/pitest/functional/F6.java

This file was deleted.

0 comments on commit 3ac2176

Please sign in to comment.