Skip to content

Conversation

@david-ruiz-cko
Copy link
Contributor

This pull request updates the handling of the dateOfBirth field in the IndividualSender class and significantly enhances the test coverage for payment session requests. The most important changes include switching the data type of dateOfBirth to a string for better date formatting flexibility and adding comprehensive tests for payment sessions involving an individual sender. Additionally, utility methods have been introduced to streamline test data creation and response verification.

Model changes:

  • Changed the type of the dateOfBirth field in IndividualSender from Instant to String to allow for direct input of formatted date strings [1] [2].

Test improvements:

  • Added a new test, shouldRequestPaymentSessionsWithFullIndividualSender, which builds a complete PaymentSessionRequest using an IndividualSender and verifies the API call and response.
  • Introduced utility methods such as createStandardAddress, createSenderAddress, createStandardPhone, createStandardBilling, createDrivingLicenceIdentification, and createIndividualSender to simplify and standardize test data creation.
  • Refactored response assertions in tests to use a helper method verifySuccessfulResponse for consistency and readability.

…st to check the proper case (Instant type was failing in the API)
@sonarqubecloud
Copy link

@david-ruiz-cko david-ruiz-cko merged commit 1c1c0a4 into master Jan 22, 2026
6 checks passed
@david-ruiz-cko david-ruiz-cko deleted the issue/522 branch January 22, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants