Esempio n. 1
0
        public void TestListNotificationPreferences()
        {
            List <Moip.Models.NotificationPreferenceResponse> notificationPreferenceResponseList = controller.ListNotificationsPreferences();

            Assert.NotNull(notificationPreferenceResponseList[0].Id, "Id should not be null");
            Assert.AreEqual("WEBHOOK", notificationPreferenceResponseList[0].Media, "Should match exactly (string literal match)");
            Assert.AreEqual("http://requestb.in/1dhjesw1", notificationPreferenceResponseList[0].Target, "Should match exactly (string literal match)");
            Assert.AreEqual("ORDER.*", notificationPreferenceResponseList[0].Events[0], "Should match exactly (string literal match)");
            Assert.AreEqual("PAYMENT.AUTHORIZED", notificationPreferenceResponseList[0].Events[1], "Should match exactly (string literal match)");
            Assert.AreEqual("PAYMENT.CANCELLED", notificationPreferenceResponseList[0].Events[2], "Should match exactly (string literal match)");
            Assert.True(notificationPreferenceResponseList.Count > 1, "Should have more than one notification preference");
        }