@@ -198,6 +198,35 @@ public IEnumerator NotificationIsScheduled_NotificationStatusIsCorrectlyReported
198
198
Debug . LogWarning ( "NotificationIsScheduled_NotificationStatusIsCorrectlyReported completed" ) ;
199
199
}
200
200
201
+ [ UnityTest ]
202
+ [ UnityPlatform ( RuntimePlatform . Android ) ]
203
+ public IEnumerator ArrivedAndUserDismissedNotification_DoesNotReportStatusAsScheduled ( )
204
+ {
205
+ var n = new AndroidNotification ( "ArrivedNotificationAndDissmissed" , "ArrivedNotificationAndDissmissed" , System . DateTime . Now ) ;
206
+ yield return DismissedNotification_DoesNotReportStatusAsScheduled ( n ) ;
207
+ }
208
+
209
+ [ UnityTest ]
210
+ [ UnityPlatform ( RuntimePlatform . Android ) ]
211
+ public IEnumerator ArrivedAndUserDismissedScheduledNotification_DoesNotReportStatusAsScheduled ( )
212
+ {
213
+ var n = new AndroidNotification ( "ArrivedNotificationAndDissmissedScheduled" , "ArrivedNotificationAndDissmissedScheduled" , System . DateTime . Now . AddSeconds ( 2 ) ) ;
214
+ yield return DismissedNotification_DoesNotReportStatusAsScheduled ( n ) ;
215
+ }
216
+
217
+ public IEnumerator DismissedNotification_DoesNotReportStatusAsScheduled ( AndroidNotification n )
218
+ {
219
+ int originalId = AndroidNotificationCenter . SendNotification ( n , kDefaultTestChannel ) ;
220
+ yield return WaitForNotification ( 8.0f ) ;
221
+
222
+ Assert . AreEqual ( 1 , currentHandler . receivedNotificationCount ) ;
223
+
224
+ AndroidNotificationCenter . CancelDisplayedNotification ( originalId ) ;
225
+ yield return new WaitForSeconds ( 2.0f ) ; // cancel is async
226
+ var status = AndroidNotificationCenter . CheckScheduledNotificationStatus ( originalId ) ;
227
+ Assert . AreEqual ( NotificationStatus . Unknown , status ) ;
228
+ }
229
+
201
230
[ Test ]
202
231
[ UnityPlatform ( RuntimePlatform . Android ) ]
203
232
public void CreateNotificationChannelWithInitializedSettings_ChannelSettingsAreSaved ( )
0 commit comments