[CAT-2382] Adapt Tests for useSingleRequestParameter Pattern #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Updates all test files to support the new request builder pattern introduced by the
useSingleRequestParameterOpenAPI Generator option.Background
The Java client has been regenerated with
useSingleRequestParameter: trueto prevent breaking changes when adding optional parameters to API methods. This requires updating all API method calls to use the new builder pattern with.execute().Changes
Pattern Transformation
All API method calls now follow this pattern:
Before:
After:
Modified Files (22 files)
TestBase.java: Updated 11 helper methods including:
createApplicant(),uploadDocument(),uploadLivePhoto(),uploadIdPhoto()createCheck(),createWorkflowRun(),cleanUpApplicants(),cleanUpWebhooks()repeatRequestUntilStatusChanges(),repeatRequestUntilTaskOutputChanges(),repeatRequestUntilHttpCodeChanges()Integration Test Files: Updated all API calls in 21 test classes:
Key Technical Changes
.execute()calls to all API method invocations.execute()on request objects before accessing resultsChecksList.getChecks())No functional changes to test logic - only API invocation pattern updated.
Migration Impact
This change supports the backward-compatible API pattern. Once merged, future additions of optional parameters will not require test updates.
Documentation
Related PRs