◆ testCreate
◆ testDidBecomeActive
- (void) testDidBecomeActive |
|
|
|
|
implementation |
Definition at line 11 of file FlutterPluginAppLifeCycleDelegateTest.mm.
66 {
68 [[XCTNSNotificationExpectation alloc] initWithName:UIApplicationDidBecomeActiveNotification];
69
71 id plugin = OCMProtocolMock(@protocol(FlutterPlugin));
73 [[NSNotificationCenter defaultCenter]
74 postNotificationName:UIApplicationDidBecomeActiveNotification
75 object:nil];
76 [self waitForExpectations:@[ expectation ] timeout:5.0];
77 OCMVerify([plugin applicationDidBecomeActive:[UIApplication sharedApplication]]);
78}
void addDelegate:(NSObject< FlutterApplicationLifeCycleDelegate > *delegate)
◆ testDidEnterBackground
- (void) testDidEnterBackground |
|
|
|
|
implementation |
Definition at line 11 of file FlutterPluginAppLifeCycleDelegateTest.mm.
24 {
25 XCTNSNotificationExpectation*
expectation = [[XCTNSNotificationExpectation alloc]
26 initWithName:UIApplicationDidEnterBackgroundNotification];
28 id plugin = OCMProtocolMock(@protocol(FlutterPlugin));
30 [[NSNotificationCenter defaultCenter]
31 postNotificationName:UIApplicationDidEnterBackgroundNotification
32 object:nil];
33
34 [self waitForExpectations:@[ expectation ] timeout:5.0];
35 OCMVerify([plugin applicationDidEnterBackground:[UIApplication sharedApplication]]);
36}
◆ testWillEnterForeground
- (void) testWillEnterForeground |
|
|
|
|
implementation |
Definition at line 11 of file FlutterPluginAppLifeCycleDelegateTest.mm.
38 {
39 XCTNSNotificationExpectation*
expectation = [[XCTNSNotificationExpectation alloc]
40 initWithName:UIApplicationWillEnterForegroundNotification];
41
43 id plugin = OCMProtocolMock(@protocol(FlutterPlugin));
45 [[NSNotificationCenter defaultCenter]
46 postNotificationName:UIApplicationWillEnterForegroundNotification
47 object:nil];
48 [self waitForExpectations:@[ expectation ] timeout:5.0];
49 OCMVerify([plugin applicationWillEnterForeground:[UIApplication sharedApplication]]);
50}
◆ testWillResignActive
- (void) testWillResignActive |
|
|
|
|
implementation |
Definition at line 11 of file FlutterPluginAppLifeCycleDelegateTest.mm.
52 {
54 [[XCTNSNotificationExpectation alloc] initWithName:UIApplicationWillResignActiveNotification];
55
57 id plugin = OCMProtocolMock(@protocol(FlutterPlugin));
59 [[NSNotificationCenter defaultCenter]
60 postNotificationName:UIApplicationWillResignActiveNotification
61 object:nil];
62 [self waitForExpectations:@[ expectation ] timeout:5.0];
63 OCMVerify([plugin applicationWillResignActive:[UIApplication sharedApplication]]);
64}
◆ testWillTerminate
- (void) testWillTerminate |
|
|
|
|
implementation |
Definition at line 11 of file FlutterPluginAppLifeCycleDelegateTest.mm.
80 {
82 [[XCTNSNotificationExpectation alloc] initWithName:UIApplicationWillTerminateNotification];
83
85 id plugin = OCMProtocolMock(@protocol(FlutterPlugin));
87 [[NSNotificationCenter defaultCenter] postNotificationName:UIApplicationWillTerminateNotification
88 object:nil];
89 [self waitForExpectations:@[ expectation ] timeout:5.0];
90 OCMVerify([plugin applicationWillTerminate:[UIApplication sharedApplication]]);
91}
The documentation for this class was generated from the following file: