Exemple #1
0
        public void TestGetNotificationPreference()
        {
            Moip.Models.NotificationPreferenceRequest notificationPreferenceRequest = Helpers.RequestsCreator.CreateNotificationRequest();

            string notificationPreferenceId = controller.CreateNotificationPreference(notificationPreferenceRequest).Id;

            Moip.Models.NotificationPreferenceResponse notificationPreferenceResponse = controller.GetNotificationPreference(notificationPreferenceId);

            Assert.NotNull(notificationPreferenceResponse.Id, "Id should not be null");
            Assert.AreEqual("WEBHOOK", notificationPreferenceResponse.Media, "Should match exactly (string literal match)");
            Assert.AreEqual("ORDER.*", notificationPreferenceResponse.Events[0], "Should match exactly (string literal match)");
            Assert.AreEqual("PAYMENT.AUTHORIZED", notificationPreferenceResponse.Events[1], "Should match exactly (string literal match)");
            Assert.AreEqual("PAYMENT.CANCELLED", notificationPreferenceResponse.Events[2], "Should match exactly (string literal match)");
        }