/// <summary> /// Test normal message behavior /// Send any immediate notifications and verify that all formats and inputs work /// The immediate messages still take a moment to complete /// </summary> private void SendImmediateNotificationsAndWait() { PlayFabAndroidPushPlugin.SendNotification(new PlayFabNotificationPackage { Id = 0, Message = null, ScheduleDate = null, Title = null, ScheduleType = ScheduleTypes.None, CustomData = null, Icon = null, Sound = null }); // Don't expect this one to arrive, but it shouldn't crash anything PlayFabAndroidPushPlugin.SendNotificationNow("CS-M Test Message"); _expectedMessages.Add("CS-M Test Message"); PlayFabAndroidPushPlugin.SendNotification(new PlayFabNotificationPackage("Obj Message", "Obj Title")); _expectedMessages.Add("Obj Message"); }
/// <summary> /// Send several scheduled notifications and verify that everything about them occurs on schedule /// </summary> private void SendScheduledNotificationsAndWait() { PlayFabAndroidPushPlugin.ScheduleNotification("UTC Scheduled Test Message", DateTime.UtcNow + TimeSpan.FromSeconds(MsgDelay), ScheduleTypes.ScheduledUtc); _expectedMessages.Add("UTC Scheduled Test Message"); PlayFabAndroidPushPlugin.ScheduleNotification("Local Scheduled Test Message", DateTime.Now + TimeSpan.FromSeconds(MsgDelay), ScheduleTypes.ScheduledLocal); _expectedMessages.Add("Local Scheduled Test Message"); var scheduledMessage = new PlayFabNotificationPackage("Scheduled Message Obj", "Scheduled Title", 0, DateTime.UtcNow + TimeSpan.FromSeconds(MsgDelay), ScheduleTypes.ScheduledUtc, "test custom"); PlayFabAndroidPushPlugin.SendNotification(scheduledMessage); _expectedMessages.Add("Scheduled Message Obj"); _expectedCustom.Add("test custom"); }