From be6a79e707a4294cc148b7c92c90387a92a31755 Mon Sep 17 00:00:00 2001 From: Henry Coles Date: Tue, 3 Jan 2023 11:18:04 +0000 Subject: [PATCH] add excluded runners parameter to Ant --- pitest-ant/src/main/java/org/pitest/ant/PitestTask.java | 4 ++++ .../src/test/java/org/pitest/ant/PitestTaskTest.java | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/pitest-ant/src/main/java/org/pitest/ant/PitestTask.java b/pitest-ant/src/main/java/org/pitest/ant/PitestTask.java index ee767bfc2..619f99d86 100644 --- a/pitest-ant/src/main/java/org/pitest/ant/PitestTask.java +++ b/pitest-ant/src/main/java/org/pitest/ant/PitestTask.java @@ -212,6 +212,10 @@ public void setExcludedGroups(final String value) { this.setOption(ConfigOption.EXCLUDED_GROUPS, value); } + public void setExcludedRunners(final String value) { + this.setOption(ConfigOption.EXCLUDED_RUNNERS, value); + } + public void setIncludedTestMethods(final String value) { this.setOption(ConfigOption.INCLUDED_TEST_METHODS, value); } diff --git a/pitest-ant/src/test/java/org/pitest/ant/PitestTaskTest.java b/pitest-ant/src/test/java/org/pitest/ant/PitestTaskTest.java index 3073e3b9a..53d110b29 100644 --- a/pitest-ant/src/test/java/org/pitest/ant/PitestTaskTest.java +++ b/pitest-ant/src/test/java/org/pitest/ant/PitestTaskTest.java @@ -232,6 +232,13 @@ public void shouldPassExcludedGroupsOptionToJavaTask() { verify(this.arg).setValue("--excludedGroups=foo"); } + @Test + public void shouldPassExcludedRunnersToJavaTask() { + this.pitestTask.setExcludedRunners("foo"); + this.pitestTask.execute(this.java); + verify(this.arg).setValue("--excludedRunners=foo"); + } + @Test public void shouldPassIncludedTestMethodsOptionToJavaTask() { this.pitestTask.setIncludedTestMethods("footest");