-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[url_launcher] migrating iOS tests from objc to swift #4758
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
Changes from 1 commit
2741de4
495de26
c898698
6a6c8d5
761c6d9
968a2f1
13e339f
11cfe4f
1228851
001f0b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,9 +7,9 @@ import XCTest | |
|
|
||
| @testable import url_launcher_ios | ||
|
|
||
| class URLLauncherTests: XCTestCase { | ||
| var plugin: FLTURLLauncherPlugin! | ||
| var launcher: FakeLauncher! | ||
| final class URLLauncherTests: XCTestCase { | ||
| private var plugin: FLTURLLauncherPlugin! | ||
| private var launcher: FakeLauncher! | ||
|
|
||
| override func setUp() { | ||
| launcher = FakeLauncher() | ||
|
|
@@ -108,7 +108,7 @@ class URLLauncherTests: XCTestCase { | |
|
|
||
| } | ||
|
|
||
| class FakeLauncher: NSObject, FULLauncher { | ||
| final fileprivate class FakeLauncher: NSObject, FULLauncher { | ||
|
||
| var passedOptions: [UIApplication.OpenExternalURLOptionsKey: Any]? | ||
|
|
||
| func canOpen(_ url: URL) -> Bool { | ||
|
|
@@ -124,7 +124,7 @@ class FakeLauncher: NSObject, FULLauncher { | |
| } | ||
| } | ||
|
|
||
| class FakeFlutterBinaryMessenger: NSObject, FlutterBinaryMessenger { | ||
| final fileprivate class FakeFlutterBinaryMessenger: NSObject, FlutterBinaryMessenger { | ||
|
||
| func send(onChannel channel: String, message: Data?) {} | ||
|
|
||
| func send( | ||
|
|
||
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.
Why did the test class become stateful in this migration? Stateful test fixtures are generally an anti-pattern, and making the object under test stateful is especially problematic.