Skip to content

Commit 2552516

Browse files
authored
Merge pull request #1171 from Adyen/new-response-attribute-test
Test handling of new response attributes
2 parents 7f43381 + ab3fbf1 commit 2552516

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

Adyen.Test/BalancePlatformTest.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,27 @@ public void GetAccountHoldersIdBalanceAccountsAsyncTest()
7878
"https://balanceplatform-api-test.adyen.com/bcl/v2/accountHolders/id/balanceAccounts?offset=1&limit=3",
7979
null, null, HttpMethod.Get, default);
8080
}
81+
82+
/// <summary>
83+
/// Test GetAccountHoldersId with additional attributes does not throw
84+
/// </summary>
85+
[TestMethod]
86+
public void GetAccountHoldersIdWithAdditionalAttributesTest()
87+
{
88+
var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/AccountHolderAdditionalAttribute.json");
89+
var service = new AccountHoldersService(client);
90+
91+
// Test that no exception is thrown when calling GetAccountHolder
92+
try
93+
{
94+
var response = service.GetAccountHolder("AH32272223222B5CM4MWJ892H");
95+
Assert.IsNotNull(response);
96+
}
97+
catch (Exception ex)
98+
{
99+
Assert.Fail($"Expected no exception, but got: {ex}");
100+
}
101+
}
81102

82103
#endregion
83104

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"balancePlatform": "BalandePlatformExample",
3+
"contactDetails": {
4+
"address": {
5+
"city": "Amsterdam",
6+
"country": "NL",
7+
"houseNumberOrName": "274",
8+
"postalCode": "1020CD",
9+
"street": "Brannan Street"
10+
},
11+
"email": "s.hopper@example.com",
12+
"phone": {
13+
"number": "+315551231234",
14+
"type": "Mobile"
15+
}
16+
},
17+
"description": "S.Hopper - Staff 123",
18+
"id": "AH32272223222B5CM4MWJ892H",
19+
"status": "active",
20+
"additionalAttribute": "something"
21+
}

0 commit comments

Comments
 (0)