Skip to content

Commit

Permalink
136: completed PitOptions
Browse files Browse the repository at this point in the history
Task-Url: #136
  • Loading branch information
LorenzoBettini committed Aug 28, 2022
1 parent 0eb1a80 commit ba6a8dc
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.pitest.pitclipse.runner;

import static com.google.common.collect.ImmutableList.copyOf;
import static org.pitest.pitclipse.runner.config.PitConfiguration.DEFAULT_AVOID_CALLS_TO_LIST;
import static org.pitest.pitclipse.runner.config.PitConfiguration.DEFAULT_MUTATORS;
import static org.pitest.pitclipse.runner.util.PitFileUtils.createParentDirs;
Expand All @@ -30,8 +29,7 @@
import java.util.Collections;
import java.util.List;

import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
import org.pitest.pitclipse.runner.util.PitUtils;

/**
* <p>Options used to parameterize a PIT analysis.</p>
Expand Down Expand Up @@ -104,7 +102,7 @@ public static final class PitOptionsBuilder {
private File historyLocation = null;
private List<String> excludedClasses = Collections.emptyList();
private List<String> excludedMethods = Collections.emptyList();
private List<String> avoidCallsTo = copyOf(split(DEFAULT_AVOID_CALLS_TO_LIST));
private List<String> avoidCallsTo = split(DEFAULT_AVOID_CALLS_TO_LIST);
private String mutators = DEFAULT_MUTATORS;
private int timeout = 3000;
private BigDecimal timeoutFactor = BigDecimal.valueOf(1.25);
Expand Down Expand Up @@ -253,7 +251,7 @@ public PitOptionsBuilder withUseJUnit5(boolean useJUnit5) {
}

private static List<String> split(String toSplit) {
return ImmutableList.copyOf(Splitter.on(',').trimResults().omitEmptyStrings().split(toSplit));
return PitUtils.splitBasedOnComma(toSplit);
}

private static File copyOfFile(File sourceDir) {
Expand Down

0 comments on commit ba6a8dc

Please sign in to comment.