forked from STAMP-project/pitmp-maven-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STAMP-project#11 Add JUnit Test to DiffMutationFilterFactory.
- Loading branch information
1 parent
fe48092
commit 8409b52
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/test/java/eu/stamp_project/interceptors/DiffMutationFilterFactoryTest.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,33 @@ | ||
package eu.stamp_project.interceptors; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import java.util.Arrays; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.pitest.mutationtest.build.InterceptorParameters; | ||
import org.pitest.mutationtest.build.InterceptorType; | ||
import org.pitest.mutationtest.build.MutationInterceptor; | ||
import org.pitest.plugin.FeatureSetting; | ||
|
||
class DiffMutationFilterFactoryTest { | ||
|
||
@Test | ||
void testInterceptorType() { | ||
DiffMutationFilterFactory diffMutationFilterFactory = new DiffMutationFilterFactory(); | ||
MutationInterceptor diffMutationFilter = diffMutationFilterFactory | ||
.createInterceptor(makeFor("file", "LICENSE")); | ||
assertEquals(InterceptorType.FILTER, diffMutationFilter.type()); | ||
} | ||
|
||
private InterceptorParameters makeFor(String key, String... vals) { | ||
final Map<String, List<String>> values = new HashMap<>(); | ||
values.put(key, Arrays.asList(vals)); | ||
final FeatureSetting fs = new FeatureSetting(null, null, values); | ||
return new InterceptorParameters(fs, null, null); | ||
} | ||
|
||
} |