Esempio n. 1
0
        public void GoogleNotificationShouldReturnCorrectPayloadWithoutSound()
        {
            var notification = new AppleNotification("notifierName", "notification message");
            var payload = notification.GetPayload();

            Assert.AreEqual("notification message", payload);
        }
Esempio n. 2
0
        public void GoogleNotificationShouldReturnCorrectPayloadWithSound()
        {
            var notification = new AppleNotification("notifierName", "notification message", "chime");
            var payload = notification.GetPayload();

            var aps = payload.GetReflectedProperty("aps");
            Assert.IsNotNull(aps);
            Assert.AreEqual("notification message", aps.GetReflectedProperty("alert"));
            Assert.AreEqual("chime", aps.GetReflectedProperty("sound"));
        }