@@ -84,24 +84,6 @@ - (void)application:(UIApplication *)application
84
84
85
85
@end
86
86
87
- /* * @class FIRAuthLegacyForwardingDelegate
88
- @brief A fake UIApplicationDelegate that implements the legacy deegate method to receive
89
- notification.
90
- */
91
- @interface FIRAuthLegacyForwardingDelegate : FIRAuthFakeForwardingDelegate
92
- @end
93
- @implementation FIRAuthLegacyForwardingDelegate
94
-
95
- - (void )application : (UIApplication *)application
96
- didReceiveRemoteNotification : (NSDictionary *)userInfo {
97
- self.notificationReceived = YES ;
98
- if (self.forwardsNotification ) {
99
- self.notificationhandled = [self .notificationManager canHandleNotification: userInfo];
100
- }
101
- }
102
-
103
- @end
104
-
105
87
/* * @class FIRAuthNotificationManagerTests
106
88
@brief Unit tests for @c FIRAuthNotificationManager .
107
89
*/
@@ -127,11 +109,6 @@ @implementation FIRAuthNotificationManagerTests {
127
109
@brief The modern fake UIApplicationDelegate for testing.
128
110
*/
129
111
FIRAuthModernForwardingDelegate *_modernDelegate;
130
-
131
- /* * @var _legacyDelegate
132
- @brief The legacy fake UIApplicationDelegate for testing.
133
- */
134
- FIRAuthLegacyForwardingDelegate *_legacyDelegate;
135
112
}
136
113
137
114
- (void )setUp {
@@ -142,8 +119,6 @@ - (void)setUp {
142
119
appCredentialManager: _mockAppCredentialManager];
143
120
_modernDelegate = [[FIRAuthModernForwardingDelegate alloc ] init ];
144
121
_modernDelegate.notificationManager = _notificationManager;
145
- _legacyDelegate = [[FIRAuthLegacyForwardingDelegate alloc ] init ];
146
- _legacyDelegate.notificationManager = _notificationManager;
147
122
}
148
123
149
124
/* * @fn testForwardingModernDelegate
@@ -153,27 +128,13 @@ - (void)testForwardingModernDelegate {
153
128
[self verifyForwarding: YES delegate: _modernDelegate];
154
129
}
155
130
156
- /* * @fn testForwardingLegacyDelegate
157
- @brief Tests checking notification forwarding on legacy fake delegate.
158
- */
159
- - (void )testForwardingLegacyDelegate {
160
- [self verifyForwarding: YES delegate: _legacyDelegate];
161
- }
162
-
163
131
/* * @fn testNotForwardingModernDelegate
164
132
@brief Tests checking notification not forwarding on modern fake delegate.
165
133
*/
166
134
- (void )testNotForwardingModernDelegate {
167
135
[self verifyForwarding: NO delegate: _modernDelegate];
168
136
}
169
137
170
- /* * @fn testNotForwardingLegacyDelegate
171
- @brief Tests checking notification not forwarding on legacy fake delegate.
172
- */
173
- - (void )testNotForwardingLegacyDelegate {
174
- [self verifyForwarding: NO delegate: _legacyDelegate];
175
- }
176
-
177
138
/* * @fn verifyForwarding:delegate:
178
139
@brief Tests checking notification forwarding on a particular delegate.
179
140
@param forwarding Whether the notification is being forwarded or not.
@@ -212,31 +173,6 @@ - (void)testCachedResult {
212
173
XCTAssertFalse (delegate.notificationReceived );
213
174
}
214
175
215
- /* * @fn testMultipleCallbacks
216
- @brief Test multiple callbacks are handled correctly.
217
- */
218
- - (void )testMultipleCallbacks {
219
- FIRAuthFakeForwardingDelegate *delegate = _legacyDelegate;
220
- delegate.forwardsNotification = YES ;
221
- OCMStub ([_mockApplication delegate ]).andReturn (delegate);
222
- XCTestExpectation *expectation1 = [self expectationWithDescription: @" callback1" ];
223
- [_notificationManager
224
- checkNotificationForwardingWithCallback: ^(BOOL isNotificationBeingForwarded) {
225
- XCTAssertTrue (isNotificationBeingForwarded);
226
- [expectation1 fulfill ];
227
- }];
228
- XCTestExpectation *expectation2 = [self expectationWithDescription: @" callback2" ];
229
- [_notificationManager
230
- checkNotificationForwardingWithCallback: ^(BOOL isNotificationBeingForwarded) {
231
- XCTAssertTrue (isNotificationBeingForwarded);
232
- [expectation2 fulfill ];
233
- }];
234
- XCTAssertFalse (delegate.notificationReceived );
235
- [self waitForExpectationsWithTimeout: _notificationManager.timeout * .5 handler: nil ];
236
- XCTAssertTrue (delegate.notificationReceived );
237
- XCTAssertTrue (delegate.notificationhandled );
238
- }
239
-
240
176
/* * @fn testPassingToCredentialManager
241
177
@brief Test notification with the right structure is passed to credential manager.
242
178
*/
0 commit comments