-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[in_app_purchase_storekit] Migrate FIATransactionCacheTests.m to.Swift #7172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[in_app_purchase_storekit] Migrate FIATransactionCacheTests.m to.Swift #7172
Conversation
Theres only 2 more test files after this 🙏 |
…ackages into iap-fiatransactioncachetests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nits
final class FIATransactionCacheTests: XCTestCase { | ||
|
||
func testAddObjectsForNewKey() { | ||
let dummyArray: [Int] = [1, 2, 3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let dummyArray = [1, 2, 3]
cache.add(dummyArray, for: TransactionCacheKey.updatedTransactions) | ||
|
||
XCTAssertEqual( | ||
dummyArray, cache.getObjectsFor(TransactionCacheKey.updatedTransactions) as! [Int]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use that unwrap function and avoid !
here?
let updatedTransactions = try XCTUnwrap(cache.getObjectsFor(TransactionCacheKey.updatedTransactions) as? [Int])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh yes, done
func testClear() { | ||
let fakeUpdatedTransactions: [Int] = [1, 2, 3] | ||
let fakeRemovedTransactions: [String] = ["Remove 1", "Remove 2", "Remove 3"] | ||
let fakeUpdatedDownloads: [String] = ["Download 1", "Download 2"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need the type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed all types
..._purchase/in_app_purchase_storekit/example/shared/RunnerTests/FIATransactionCacheTests.swift
Outdated
Show resolved
Hide resolved
…ackages into iap-fiatransactioncachetests
auto label is removed for flutter/packages/7172, due to - The status or check suite Mac_arm64 macos_repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label. |
flutter/packages@c7f0526...3144ac0 2024-07-19 [email protected] [in_app_purchase_storekit] Migrate FIATransactionCacheTests.m to.Swift (flutter/packages#7172) 2024-07-18 [email protected] [rfw][ci] Skip failing rfw golden tests (flutter/packages#7170) 2024-07-18 [email protected] [go_router] docs: fix flutter run command for Stateful Nested Navigation (flutter/packages#7158) 2024-07-18 [email protected] [in_app_purchase_storekit] Migrate FIAPPaymentQueueDeleteTests.m to.Swift (flutter/packages#7171) 2024-07-18 49699333+dependabot[bot]@users.noreply.github.com [image_picker]: Bump androidx.activity:activity from 1.7.2 to 1.8.2 in /packages/image_picker/image_picker_android/android (flutter/packages#5704) 2024-07-18 49699333+dependabot[bot]@users.noreply.github.com [url_launcher]: Bump androidx.core:core from 1.10.1 to 1.13.1 in /packages/url_launcher/url_launcher_android/android (flutter/packages#6668) 2024-07-18 [email protected] [shared_preferences] Platform interface for new shared preferences async (flutter/packages#6962) 2024-07-18 [email protected] [file_selector_android] Use Espresso 4.0 (flutter/packages#7159) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@c7f0526...3144ac0 2024-07-19 [email protected] [in_app_purchase_storekit] Migrate FIATransactionCacheTests.m to.Swift (flutter/packages#7172) 2024-07-18 [email protected] [rfw][ci] Skip failing rfw golden tests (flutter/packages#7170) 2024-07-18 [email protected] [go_router] docs: fix flutter run command for Stateful Nested Navigation (flutter/packages#7158) 2024-07-18 [email protected] [in_app_purchase_storekit] Migrate FIAPPaymentQueueDeleteTests.m to.Swift (flutter/packages#7171) 2024-07-18 49699333+dependabot[bot]@users.noreply.github.com [image_picker]: Bump androidx.activity:activity from 1.7.2 to 1.8.2 in /packages/image_picker/image_picker_android/android (flutter/packages#5704) 2024-07-18 49699333+dependabot[bot]@users.noreply.github.com [url_launcher]: Bump androidx.core:core from 1.10.1 to 1.13.1 in /packages/url_launcher/url_launcher_android/android (flutter/packages#6668) 2024-07-18 [email protected] [shared_preferences] Platform interface for new shared preferences async (flutter/packages#6962) 2024-07-18 [email protected] [file_selector_android] Use Espresso 4.0 (flutter/packages#7159) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@c7f0526...3144ac0 2024-07-19 [email protected] [in_app_purchase_storekit] Migrate FIATransactionCacheTests.m to.Swift (flutter/packages#7172) 2024-07-18 [email protected] [rfw][ci] Skip failing rfw golden tests (flutter/packages#7170) 2024-07-18 [email protected] [go_router] docs: fix flutter run command for Stateful Nested Navigation (flutter/packages#7158) 2024-07-18 [email protected] [in_app_purchase_storekit] Migrate FIAPPaymentQueueDeleteTests.m to.Swift (flutter/packages#7171) 2024-07-18 49699333+dependabot[bot]@users.noreply.github.com [image_picker]: Bump androidx.activity:activity from 1.7.2 to 1.8.2 in /packages/image_picker/image_picker_android/android (flutter/packages#5704) 2024-07-18 49699333+dependabot[bot]@users.noreply.github.com [url_launcher]: Bump androidx.core:core from 1.10.1 to 1.13.1 in /packages/url_launcher/url_launcher_android/android (flutter/packages#6668) 2024-07-18 [email protected] [shared_preferences] Platform interface for new shared preferences async (flutter/packages#6962) 2024-07-18 [email protected] [file_selector_android] Use Espresso 4.0 (flutter/packages#7159) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Part of flutter/flutter#151624
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.md
to add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes].///
).