Definition at line 16 of file FlutterAppDelegateTest.mm.
◆ setUp
Definition at line 24 of file FlutterAppDelegateTest.mm.
29 {
30 [super setUp];
31
35
38
41 self.mockNavigationChannel = navigationChannel;
42
44 OCMStub([
engine navigationChannel]).andReturn(navigationChannel);
46
52 };
53}
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
id mockEngineFirstFrameCallback
FlutterAppDelegate * appDelegate
FlutterViewController *(^ rootFlutterViewControllerGetter)(void)
FlutterViewController * viewController
◆ tearDown
◆ testLaunchUrl
Definition at line 24 of file FlutterAppDelegateTest.mm.
61 {
62 OCMStub([
self.
mockMainBundle objectForInfoDictionaryKey:
@"FlutterDeepLinkingEnabled"])
63 .andReturn(@YES);
64
66 [self.appDelegate application:[UIApplication sharedApplication]
67 openURL:[NSURL URLWithString:@"http://myApp/custom/route?query=test"]
68 options:@{}];
71 invokeMethod:@"pushRouteInformation"
72 arguments:@{@"location" : @"http://myApp/custom/route?query=test"}]);
73}
◆ testLaunchUrlWithDeepLinkingDisabled
- (void) testLaunchUrlWithDeepLinkingDisabled |
|
|
|
|
implementation |
Definition at line 24 of file FlutterAppDelegateTest.mm.
87 {
88 OCMStub([
self.
mockMainBundle objectForInfoDictionaryKey:
@"FlutterDeepLinkingEnabled"])
89 .andReturn(@NO);
90
92 [self.appDelegate application:[UIApplication sharedApplication]
93 openURL:[NSURL URLWithString:@"http://myApp/custom/route?query=test"]
94 options:@{}];
97}
◆ testLaunchUrlWithDeepLinkingNotSet
- (void) testLaunchUrlWithDeepLinkingNotSet |
|
|
|
|
implementation |
Definition at line 24 of file FlutterAppDelegateTest.mm.
75 {
76 OCMStub([
self.
mockMainBundle objectForInfoDictionaryKey:
@"FlutterDeepLinkingEnabled"])
77 .andReturn(nil);
78
80 [self.appDelegate application:[UIApplication sharedApplication]
81 openURL:[NSURL URLWithString:@"http://myApp/custom/route?query=test"]
82 options:@{}];
85}
◆ testLaunchUrlWithFragmentNoQueryParameter
- (void) testLaunchUrlWithFragmentNoQueryParameter |
|
|
|
|
implementation |
Definition at line 24 of file FlutterAppDelegateTest.mm.
113 {
114 OCMStub([
self.
mockMainBundle objectForInfoDictionaryKey:
@"FlutterDeepLinkingEnabled"])
115 .andReturn(@YES);
116
118 [self.appDelegate application:[UIApplication sharedApplication]
119 openURL:[NSURL URLWithString:@"http://myApp/custom/route#fragment"]
120 options:@{}];
123 invokeMethod:@"pushRouteInformation"
124 arguments:@{@"location" : @"http://myApp/custom/route#fragment"}]);
125}
◆ testLaunchUrlWithQueryParameterAndFragment
- (void) testLaunchUrlWithQueryParameterAndFragment |
|
|
|
|
implementation |
Definition at line 24 of file FlutterAppDelegateTest.mm.
99 {
100 OCMStub([
self.
mockMainBundle objectForInfoDictionaryKey:
@"FlutterDeepLinkingEnabled"])
101 .andReturn(@YES);
102
104 application:[UIApplication sharedApplication]
105 openURL:[NSURL URLWithString:@"http://myApp/custom/route?query=test#fragment"]
106 options:@{}];
109 invokeMethod:@"pushRouteInformation"
110 arguments:@{@"location" : @"http://myApp/custom/route?query=test#fragment"}]);
111}
◆ testReleasesWindowOnDealloc
- (void) testReleasesWindowOnDealloc |
|
|
|
|
implementation |
Definition at line 24 of file FlutterAppDelegateTest.mm.
127 {
128 __weak UIWindow* weakWindow;
129 @autoreleasepool {
130 id mockWindow = OCMClassMock([UIWindow class]);
133 weakWindow = mockWindow;
134 XCTAssertNotNil(weakWindow);
135 [mockWindow stopMocking];
136 mockWindow = nil;
138 }
139
140 XCTAssertNil(weakWindow);
141}
FlutterAppLifeCycleProvider UIWindow * window
◆ testUniversalLinkPushRouteInformation
- (void) testUniversalLinkPushRouteInformation |
|
|
|
|
implementation |
Definition at line 24 of file FlutterAppDelegateTest.mm.
145 {
146 OCMStub([
self.
mockMainBundle objectForInfoDictionaryKey:
@"FlutterDeepLinkingEnabled"])
147 .andReturn(@YES);
148
149 NSUserActivity* userActivity = [[NSUserActivity alloc] initWithActivityType:@"com.example.test"];
150 userActivity.webpageURL = [NSURL URLWithString:@"http://myApp/custom/route?query=test"];
152 application:[UIApplication sharedApplication]
153 continueUserActivity:userActivity
154 restorationHandler:^(NSArray<id<UIUserActivityRestoring>>* __nullable restorableObjects){
155 }];
158 invokeMethod:@"pushRouteInformation"
159 arguments:@{@"location" : @"http://myApp/custom/route?query=test"}]);
160}
◆ appDelegate
◆ mockEngineFirstFrameCallback
- (id) mockEngineFirstFrameCallback |
|
readwriteatomicstrong |
◆ mockMainBundle
◆ mockNavigationChannel
- (id) mockNavigationChannel |
|
readwriteatomicstrong |
The documentation for this class was generated from the following file: