@@ -54,17 +54,15 @@ private List<ChecksDetails> getDetails() {
5454 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
5555 void extractChecksDetailsPassingTestResults () throws Exception {
5656 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
57- j .setDefinition (new CpsFlowDefinition (
58- """
57+ j .setDefinition (new CpsFlowDefinition ("""
5958 stage('first') {
6059 node {
6160 touch 'test-result.xml'
6261 def results = junit(testResults: '*.xml')
6362 assert results.totalCount == 6
6463 }
6564 }
66- """ ,
67- true ));
65+ """ , true ));
6866 FilePath ws = rule .jenkins .getWorkspaceFor (j );
6967 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
7068 testFile .copyFrom (TestResultTest .class .getResource ("junit-report-1463.xml" ));
@@ -87,16 +85,14 @@ void extractChecksDetailsPassingTestResults() throws Exception {
8785 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
8886 void extractChecksDetailsFailingSingleTestResult () throws Exception {
8987 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
90- j .setDefinition (new CpsFlowDefinition (
91- """
88+ j .setDefinition (new CpsFlowDefinition ("""
9289 stage('first') {
9390 node {
9491 def results = junit(testResults: '*.xml')
9592 assert results.totalCount == 6
9693 }
9794 }
98- """ ,
99- true ));
95+ """ , true ));
10096 FilePath ws = rule .jenkins .getWorkspaceFor (j );
10197 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
10298 testFile .copyFrom (TestResultTest .class .getResource ("junit-report-errror-details.xml" ));
@@ -118,16 +114,14 @@ void extractChecksDetailsFailingSingleTestResult() throws Exception {
118114 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
119115 void extractChecksDetailsFailingMultipleTests () throws Exception {
120116 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
121- j .setDefinition (new CpsFlowDefinition (
122- """
117+ j .setDefinition (new CpsFlowDefinition ("""
123118 stage('first') {
124119 node {
125120 def results = junit(testResults: '*.xml')
126121 assert results.totalCount == 6
127122 }
128123 }
129- """ ,
130- true ));
124+ """ , true ));
131125 FilePath ws = rule .jenkins .getWorkspaceFor (j );
132126 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
133127 testFile .copyFrom (TestResultTest .class .getResource ("junit-report-20090516.xml" ));
@@ -149,17 +143,15 @@ void extractChecksDetailsFailingMultipleTests() throws Exception {
149143 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
150144 void extractChecksDetailsCustomCheckName () throws Exception {
151145 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
152- j .setDefinition (new CpsFlowDefinition (
153- """
146+ j .setDefinition (new CpsFlowDefinition ("""
154147 stage('first') {
155148 node {
156149 touch 'test-result.xml'
157150 def results = junit(testResults: '*.xml', checksName: 'Custom Checks Name')
158151 assert results.totalCount == 6
159152 }
160153 }
161- """ ,
162- true ));
154+ """ , true ));
163155 FilePath ws = rule .jenkins .getWorkspaceFor (j );
164156 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
165157 testFile .copyFrom (TestResultTest .class .getResource ("junit-report-1463.xml" ));
@@ -177,15 +169,13 @@ void extractChecksDetailsCustomCheckName() throws Exception {
177169 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
178170 void extractChecksDetailsNoStageContext () throws Exception {
179171 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
180- j .setDefinition (new CpsFlowDefinition (
181- """
172+ j .setDefinition (new CpsFlowDefinition ("""
182173 node {
183174 touch 'test-result.xml'
184175 def results = junit(testResults: '*.xml')
185176 assert results.totalCount == 6
186177 }
187- """ ,
188- true ));
178+ """ , true ));
189179 FilePath ws = rule .jenkins .getWorkspaceFor (j );
190180 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
191181 testFile .copyFrom (TestResultTest .class .getResource ("junit-report-1463.xml" ));
@@ -201,16 +191,14 @@ void extractChecksDetailsNoStageContext() throws Exception {
201191 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
202192 void extractChecksDetailsNestedStages () throws Exception {
203193 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
204- j .setDefinition (new CpsFlowDefinition (
205- """
194+ j .setDefinition (new CpsFlowDefinition ("""
206195 stage('first') { stage('second') {
207196 node {
208197 def results = junit(testResults: '*.xml')
209198 assert results.totalCount == 6
210199 }
211200 }}
212- """ ,
213- true ));
201+ """ , true ));
214202 FilePath ws = rule .jenkins .getWorkspaceFor (j );
215203 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
216204 testFile .copyFrom (TestResultTest .class .getResource ("junit-report-1463.xml" ));
@@ -226,16 +214,14 @@ void extractChecksDetailsNestedStages() throws Exception {
226214 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
227215 void extractChecksDetailsEmptySuite () throws Exception {
228216 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
229- j .setDefinition (new CpsFlowDefinition (
230- """
217+ j .setDefinition (new CpsFlowDefinition ("""
231218 stage('first') {
232219 node {
233220 def results = junit(testResults: '*.xml', allowEmptyResults: true)
234221 assert results.totalCount == 0
235222 }
236223 }
237- """ ,
238- true ));
224+ """ , true ));
239225
240226 rule .buildAndAssertSuccess (j );
241227
@@ -253,8 +239,7 @@ void extractChecksDetailsEmptySuite() throws Exception {
253239 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
254240 void withChecksContext () throws Exception {
255241 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
256- j .setDefinition (new CpsFlowDefinition (
257- """
242+ j .setDefinition (new CpsFlowDefinition ("""
258243 stage('first') {
259244 node {
260245 touch 'test-result.xml'
@@ -264,8 +249,7 @@ void withChecksContext() throws Exception {
264249 }
265250 }
266251 }
267- """ ,
268- true ));
252+ """ , true ));
269253
270254 FilePath ws = rule .jenkins .getWorkspaceFor (j );
271255 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
@@ -290,8 +274,7 @@ void withChecksContext() throws Exception {
290274 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
291275 void withChecksContextDeclarative () throws Exception {
292276 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
293- j .setDefinition (new CpsFlowDefinition (
294- """
277+ j .setDefinition (new CpsFlowDefinition ("""
295278 pipeline {
296279 agent any
297280 stages {
@@ -303,8 +286,7 @@ void withChecksContextDeclarative() throws Exception {
303286 }
304287 }
305288 }
306- }""" ,
307- true ));
289+ }""" , true ));
308290
309291 FilePath ws = rule .jenkins .getWorkspaceFor (j );
310292 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
@@ -329,8 +311,7 @@ void withChecksContextDeclarative() throws Exception {
329311 @ SuppressWarnings ("OptionalGetWithoutIsPresent" )
330312 void withChecksContextWithCustomName () throws Exception {
331313 WorkflowJob j = rule .jenkins .createProject (WorkflowJob .class , "singleStep" );
332- j .setDefinition (new CpsFlowDefinition (
333- """
314+ j .setDefinition (new CpsFlowDefinition ("""
334315 stage('first') {
335316 node {
336317 touch 'test-result.xml'
@@ -340,8 +321,7 @@ void withChecksContextWithCustomName() throws Exception {
340321 }
341322 }
342323 }
343- """ ,
344- true ));
324+ """ , true ));
345325
346326 FilePath ws = rule .jenkins .getWorkspaceFor (j );
347327 FilePath testFile = Objects .requireNonNull (ws ).child ("test-result.xml" );
0 commit comments