Skip to content

Commit 86438ca

Browse files
authored
Inject Contrast finding XML files into test (#362)
1 parent 91773bb commit 86438ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

framework/codemodder-testutils/src/main/java/io/codemodder/testutils/CodemodTestMixin.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ private void verifyCodemod(
124124
// Check for any a defectdojo
125125
Path defectDojo = testResourceDir.resolve("defectdojo.json");
126126

127+
// Check for Contrast
128+
Path contrastXml = testResourceDir.resolve("contrast.xml");
129+
127130
// run the codemod
128131
CodemodLoader loader =
129132
new CodemodLoader(
@@ -137,7 +140,7 @@ private void verifyCodemod(
137140
List.of(),
138141
Files.exists(sonarJson) ? sonarJson : null,
139142
Files.exists(defectDojo) ? defectDojo : null,
140-
null);
143+
Files.exists(contrastXml) ? contrastXml : null);
141144

142145
List<CodemodIdPair> codemods = loader.getCodemods();
143146
assertThat(codemods.size(), equalTo(1));

0 commit comments

Comments
 (0)