@@ -29,15 +29,23 @@ class CleanthatJavaRefactorerTest extends MavenIntegrationHarness {
29
29
void testLiteralsFirstInComparisons () throws Exception {
30
30
writePomWithJavaSteps (
31
31
"<cleanthat>" ,
32
+ " <mutators>" ,
33
+ " <mutator>LiteralsFirstInComparisons</mutator>" ,
34
+ " </mutators>" ,
32
35
"</cleanthat>" );
33
36
34
37
runTest ("LiteralsFirstInComparisons.dirty.java" , "LiteralsFirstInComparisons.clean.java" );
35
38
}
36
39
37
40
@ Test
38
41
void testMultipleMutators_defaultIsJdk7 () throws Exception {
42
+ // OptionalNotEmpty will be excluded as it is not compatible with JDK7
39
43
writePomWithJavaSteps (
40
44
"<cleanthat>" ,
45
+ " <mutators>" ,
46
+ " <mutator>LiteralsFirstInComparisons</mutator>" ,
47
+ " <mutator>OptionalNotEmpty</mutator>" ,
48
+ " </mutators>" ,
41
49
"</cleanthat>" );
42
50
43
51
runTest ("MultipleMutators.dirty.java" , "MultipleMutators.clean.onlyLiteralsFirst.java" );
@@ -47,7 +55,11 @@ void testMultipleMutators_defaultIsJdk7() throws Exception {
47
55
void testMultipleMutators_Jdk11IntroducedOptionalisPresent () throws Exception {
48
56
writePomWithJavaSteps (
49
57
"<cleanthat>" ,
50
- "<sourceJdk>11</sourceJdk>" ,
58
+ " <sourceJdk>11</sourceJdk>" ,
59
+ " <mutators>" ,
60
+ " <mutator>LiteralsFirstInComparisons</mutator>" ,
61
+ " <mutator>OptionalNotEmpty</mutator>" ,
62
+ " </mutators>" ,
51
63
"</cleanthat>" );
52
64
53
65
runTest ("MultipleMutators.dirty.java" , "MultipleMutators.clean.java" );
@@ -57,6 +69,10 @@ void testMultipleMutators_Jdk11IntroducedOptionalisPresent() throws Exception {
57
69
void testExcludeOptionalNotEmpty () throws Exception {
58
70
writePomWithJavaSteps (
59
71
"<cleanthat>" ,
72
+ " <mutators>" ,
73
+ " <mutator>LiteralsFirstInComparisons</mutator>" ,
74
+ " <mutator>OptionalNotEmpty</mutator>" ,
75
+ " </mutators>" ,
60
76
" <excludedMutators>" ,
61
77
" <excludedMutator>OptionalNotEmpty</excludedMutator>" ,
62
78
" </excludedMutators>" ,
0 commit comments