Adds MPANs configuration objects to ApplePay config - #345
Conversation
|
|
||
| NSURL *managementURL = [NSURL URLWithString:Settings.defaultSettings.applePayAutomaticReloadPaymentManagementUrl]; | ||
|
|
||
| if (@available(iOS 16.0, *)) { |
There was a problem hiding this comment.
Maybe it would make sense to join these two ifs together (this and 452 line).
If so, the same case down below (lines 469 and 473) in deferred payment case.
| * | ||
| * [NOTE: Deferred Payment is only available starting with iOS 16.4] | ||
| */ | ||
| @property (nonatomic, strong, nullable) JPDeferredPaymentRequest *deferredPaymentRequest API_AVAILABLE(macos(13.3), ios(16.4)) API_UNAVAILABLE(watchos); |
There was a problem hiding this comment.
Do we need to mention macos in API_AVAILABLE?
| func test_ToPKItem_MapsThresholdAmount() { | ||
| let pkItem = sut.toPKAutomaticReloadPaymentSummaryItem() | ||
| XCTAssertEqual(pkItem.thresholdAmount, thresholdAmount) | ||
| } |
There was a problem hiding this comment.
Maybe we could join the last 3 tests into 1, as it is checking whether all required properties are reassigned correctly by toPKAutomaticReloadPaymentSummaryItem.
It allows to shorten the code a bit, and we already do like it for example in test_ToPKRequest_MapsRequiredProperties (JPAutomaticReloadPaymentRequestTests.swift).
|
| */ | ||
| func test_OnInitialization_SetsManagementURL() { | ||
| XCTAssertEqual(sut.managementURL, managementURL) | ||
| } |
There was a problem hiding this comment.
Maybe we could join these two tests test_OnInitialization_SetsManagementURL and test_OnInitialization_SetsPaymentDescription together and check in one test whether all required properties are provided (similarly as below in test_ToPKRequest_MapsRequiredProperties).
|
|
||
| NSURL *managementURL = [NSURL URLWithString:Settings.defaultSettings.applePayDeferredPaymentManagementUrl]; | ||
|
|
||
| if (@available(iOS 16.4, *)) { |
There was a problem hiding this comment.
Cosmetics, but probably we could join these two ifs together (452 and 456 lines).





No description provided.