Skip to content

Add tests and mock data#1238

Merged
gcatanese merged 1 commit intomainfrom
test-request-response-headers
Feb 2, 2026
Merged

Add tests and mock data#1238
gcatanese merged 1 commit intomainfrom
test-request-response-headers

Conversation

@gcatanese
Copy link
Contributor

This pull request introduces comprehensive unit tests for the SCA Association Management functionality in the Balance Platform, adds new mock JSON files for test data, and expands test coverage for custom headers in both the Payments and Terminal API services. The changes ensure that serialization/deserialization of requests and responses is validated, custom header handling is thoroughly tested, and the test suite is better organized with realistic mock data.

SCA Association Management Test Coverage:

  • Added SCAAssociationManagementTest with tests for deserializing ApproveAssociationRequest, ApproveAssociationResponse, ListAssociationsResponse, and RemoveAssociationRequest using new mock JSON files. This validates that the models correctly map to the expected API payloads. [1] [2] [3] [4] [5]
  • Added SCAAssociationManagementServiceTest to verify that the service sends requests with the correct headers, properly handles unauthorized responses, and checks that the service methods are called with expected arguments.

Mock Data Additions:

  • Introduced mock JSON files for SCA association requests and responses, which are used in the new and updated tests to simulate real API payloads. [1] [2] [3] [4]

Custom Header Handling Tests:

  • Added a test in PaymentsTest to verify that additional custom headers are correctly added and sent with the Payments service requests.
  • Added a test in HeaderRequestTest to ensure that additional custom headers can be added to RequestOptions and are stored as expected.

Minor Code Cleanup:

  • Cleaned up unused imports in HeaderRequestTest.cs for better maintainability.Description

Tested scenarios

Fixed issue:

@gcatanese gcatanese requested review from a team as code owners February 2, 2026 13:06
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@gcatanese gcatanese added this pull request to the merge queue Feb 2, 2026
Merged via the queue into main with commit 1f7856a Feb 2, 2026
2 checks passed
@gcatanese gcatanese deleted the test-request-response-headers branch February 2, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants