-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
pitest-entry/src/test/java/org/pitest/mutationtest/ListenerArgumentsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.pitest.mutationtest; | ||
|
||
import org.junit.Test; | ||
import org.pitest.mutationtest.verify.BuildIssue; | ||
|
||
import java.util.List; | ||
|
||
import static java.util.Arrays.asList; | ||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class ListenerArgumentsTest { | ||
|
||
@Test | ||
public void removesDuplicateBuildIssues() { | ||
List<BuildIssue> issues = asList(BuildIssue.issue("foo"), BuildIssue.issue("foo")); | ||
ListenerArguments underTest = new ListenerArguments(null, null, null, null, 0, false, null, issues); | ||
assertThat(underTest.issues()).containsExactly(BuildIssue.issue("foo")); | ||
} | ||
|
||
@Test | ||
public void ordersBuildIssuesByPriority() { | ||
BuildIssue a = new BuildIssue("foo", null, 5); | ||
BuildIssue b = new BuildIssue("important", null, 0); | ||
BuildIssue c = new BuildIssue("bar", null, 4); | ||
List<BuildIssue> issues = asList(a,b,c); | ||
ListenerArguments underTest = new ListenerArguments(null, null, null, null, 0, false, null, issues); | ||
assertThat(underTest.issues()).containsExactly(b, c, a); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters