@@ -118,7 +118,7 @@ public void when_checkmarx_has_only_unsupported_files_the_result_is_canceled() t
118
118
simulateUpdateScanSettingsForProjectWereSuccessful (fetchScanSettingsResultMap , serverReturnedEngineConfigurationId );
119
119
120
120
/* upload */
121
- simulateUploadZipFileWasSuccesful ();
121
+ simulateUploadZipFileWasSuccessful ();
122
122
123
123
/* scan start */
124
124
simulateStartScanAccepted ();
@@ -155,7 +155,7 @@ public void simulate_start__create_new_project_and_scan_token_expires_very_often
155
155
156
156
/* upload */
157
157
simulateExpiredBearerTokenLeadsToLoginRequest ();
158
- simulateUploadZipFileWasSuccesful ();
158
+ simulateUploadZipFileWasSuccessful ();
159
159
160
160
simulateExpiredBearerTokenLeadsToLoginRequest ();
161
161
simulateStartScanAccepted ();
@@ -175,7 +175,7 @@ public void simulate_start__create_new_project_and_scan_token_expires_very_often
175
175
simulateCheckScanAvailableReturns ("Finished" );
176
176
177
177
simulateExpiredBearerTokenLeadsToLoginRequest ();
178
- simulateStartReportCreationWasSuccesful ();
178
+ simulateStartReportCreationWasSuccessful ();
179
179
180
180
simulateExpiredBearerTokenLeadsToLoginRequest ();
181
181
simulateWaitForReportResultsReturns ("Something" );
@@ -185,7 +185,7 @@ public void simulate_start__create_new_project_and_scan_token_expires_very_often
185
185
simulateWaitForReportResultsReturns ("Created" );
186
186
187
187
simulateExpiredBearerTokenLeadsToLoginRequest ();
188
- simulateDownloadReportSuccesful ();
188
+ simulateDownloadReportSuccessful ();
189
189
190
190
/* execute */
191
191
AdapterExecutionResult adapterResult = executeAndLogHistoryOnFailure (() -> adapterToTest .start (config , callback ));
@@ -224,14 +224,14 @@ public void simulate_restart_upload_done_but_no_scan() throws Exception {
224
224
simulateCheckScanAvailableReturns ("Finished" );
225
225
226
226
/* report start */
227
- simulateStartReportCreationWasSuccesful ();
227
+ simulateStartReportCreationWasSuccessful ();
228
228
229
229
simulateWaitForReportResultsReturns ("Something" );
230
230
simulateWaitForReportResultsReturns ("Something" );
231
231
simulateWaitForReportResultsReturns ("Created" );
232
232
233
233
/* download report */
234
- simulateDownloadReportSuccesful ();
234
+ simulateDownloadReportSuccessful ();
235
235
236
236
}
237
237
@@ -255,13 +255,13 @@ public void simulate_restart_scan_already_exists_and_has_finished_but_no_report(
255
255
256
256
/* report start */
257
257
/* report start */
258
- simulateStartReportCreationWasSuccesful ();
258
+ simulateStartReportCreationWasSuccessful ();
259
259
260
260
simulateWaitForReportResultsReturns ("Something" );
261
261
simulateWaitForReportResultsReturns ("Created" );
262
262
263
263
/* download report */
264
- simulateDownloadReportSuccesful ();
264
+ simulateDownloadReportSuccessful ();
265
265
266
266
/* execute */
267
267
AdapterExecutionResult adapterResult = executeAndLogHistoryOnFailure (() -> adapterToTest .start (config , callback ));
@@ -296,7 +296,7 @@ public void simulate_restart_and_scan_already_exists_and_also_report_exists_and_
296
296
simulateWaitForReportResultsReturns ("Created" );
297
297
298
298
/* download report */
299
- simulateDownloadReportSuccesful ();
299
+ simulateDownloadReportSuccessful ();
300
300
301
301
/* execute */
302
302
AdapterExecutionResult adapterResult = executeAndLogHistoryOnFailure (() -> adapterToTest .start (config , callback ));
@@ -327,7 +327,7 @@ public void simulate_start__create_new_project_and_scan_token_expires_one_hour_a
327
327
simulateUpdateScanSettingsForProjectWereSuccessful (fetchScanSettingsResultMap , serverReturnedEngineConfigurationId );
328
328
329
329
/* upload */
330
- simulateUploadZipFileWasSuccesful ();
330
+ simulateUploadZipFileWasSuccessful ();
331
331
332
332
/* scan start */
333
333
simulateStartScanAccepted ();
@@ -341,14 +341,14 @@ public void simulate_start__create_new_project_and_scan_token_expires_one_hour_a
341
341
simulateCheckScanAvailableReturns ("Finished" );
342
342
343
343
/* report start */
344
- simulateStartReportCreationWasSuccesful ();
344
+ simulateStartReportCreationWasSuccessful ();
345
345
346
346
simulateWaitForReportResultsReturns ("Something" );
347
347
simulateWaitForReportResultsReturns ("Something" );
348
348
simulateWaitForReportResultsReturns ("Created" );
349
349
350
350
/* download report */
351
- simulateDownloadReportSuccesful ();
351
+ simulateDownloadReportSuccessful ();
352
352
353
353
/* execute */
354
354
AdapterExecutionResult adapterResult = executeAndLogHistoryOnFailure (() -> adapterToTest .start (config , callback ));
@@ -361,12 +361,12 @@ public void simulate_start__create_new_project_and_scan_token_expires_one_hour_a
361
361
362
362
}
363
363
364
- private void simulateDownloadReportSuccesful () {
364
+ private void simulateDownloadReportSuccessful () {
365
365
stubFor (get (urlEqualTo (history .rememberGET (apiURLSupport .nextURL ("/cxrestapi/reports/sastScan/" + CHECKMARX_REPORT_ID ))))
366
366
.willReturn (aResponse ().withStatus (HttpStatus .OK .value ()).withHeader ("Content-Type" , APPLICATION_JSON ).withBody (CONTENT_FROM_CHECKMARX )));
367
367
}
368
368
369
- private void simulateStartReportCreationWasSuccesful () {
369
+ private void simulateStartReportCreationWasSuccessful () {
370
370
LinkedHashMap <String , Object > scanReportCreation = new LinkedHashMap <>();
371
371
scanReportCreation .put ("reportType" , "XML" );
372
372
scanReportCreation .put ("scanId" , CHECKMARX_SCAN_ID );
@@ -400,7 +400,7 @@ private void simulateStartScanAccepted() {
400
400
.withBody (JSONTestUtil .toJSONContainingNullValues (startScanResult ))));
401
401
}
402
402
403
- private void simulateUploadZipFileWasSuccesful () {
403
+ private void simulateUploadZipFileWasSuccessful () {
404
404
stubFor (post (urlEqualTo (history .rememberPOST (apiURLSupport .nextURL ("/cxrestapi/projects/" + CHECKMARX_PROJECT_ID + "/sourceCode/attachments" ))))
405
405
.withHeader ("content-type" , containing ("multipart/form-data;boundary=" ))
406
406
.withMultipartRequestBody (aMultipart ().withBody (equalTo ("pseudo-zip-content" )).withName ("zippedSource" ))
@@ -624,5 +624,4 @@ private AdapterExecutionResult executeAndLogHistoryOnFailure(Callable<AdapterExe
624
624
throw e ;
625
625
}
626
626
}
627
-
628
627
}
0 commit comments