public void GetAllTemplates()
        {
            TemplateList templateList = this.client.GetAllTemplates();

            Assert.IsNotNull(templateList);
            Assert.IsTrue(templateList.templates.Count > 0);

            foreach (TemplateResponse template in templateList.templates)
            {
                NotifyAssertions.AssertTemplateResponse(template);
            }
        }
        public void GetAllEmailTemplates()
        {
            const String type         = "email";
            TemplateList templateList = this.client.GetAllTemplates(type);

            Assert.IsNotNull(templateList);
            Assert.IsTrue(templateList.templates.Count > 0);

            foreach (TemplateResponse template in templateList.templates)
            {
                NotifyAssertions.AssertTemplateResponse(template, type);
            }
        }
        public void GetAllNotifications()
        {
            NotificationList notificationsResponse = this.client.GetNotifications();

            Assert.IsNotNull(notificationsResponse);
            Assert.IsNotNull(notificationsResponse.notifications);

            List <Notification> notifications = notificationsResponse.notifications;

            foreach (Notification notification in notifications)
            {
                NotifyAssertions.AssertNotification(notification);
            }
        }
        public void GetReceivedTexts()
        {
            NotificationClient       client_inbound           = new NotificationClient(NOTIFY_API_URL, INBOUND_SMS_QUERY_KEY);
            ReceivedTextListResponse receivedTextListResponse = client_inbound.GetReceivedTexts();

            Assert.IsNotNull(receivedTextListResponse);
            Assert.IsNotNull(receivedTextListResponse.receivedTexts);
            Assert.IsTrue(receivedTextListResponse.receivedTexts.Count > 0);

            List <ReceivedTextResponse> receivedTexts = receivedTextListResponse.receivedTexts;

            foreach (ReceivedTextResponse receivedText in receivedTexts)
            {
                NotifyAssertions.AssertReceivedTextResponse(receivedText);
            }
        }
        public void GetEmailNotificationWithIdReturnsNotification()
        {
            SendEmailTestWithPersonalisation();
            Notification notification = this.client.GetNotificationById(this.emailNotificationId);

            Assert.IsNotNull(notification);
            Assert.IsNotNull(notification.id);
            Assert.AreEqual(notification.id, this.emailNotificationId);

            Assert.IsNotNull(notification.body);
            Assert.AreEqual(notification.body, TEST_EMAIL_BODY);
            Assert.IsNotNull(notification.subject);
            Assert.AreEqual(notification.subject, TEST_EMAIL_SUBJECT);

            NotifyAssertions.AssertNotification(notification);
        }
        public void GetSMSNotificationWithIdReturnsNotification()
        {
            SendSmsTestWithPersonalisation();
            Notification notification = this.client.GetNotificationById(this.smsNotificationId);

            Assert.IsNotNull(notification);
            Assert.IsNotNull(notification.id);
            Assert.AreEqual(notification.id, this.smsNotificationId);

            Assert.IsNotNull(notification.body);
            Assert.AreEqual(notification.body, TEST_SMS_BODY);

            Assert.IsNotNull(notification.reference);
            Assert.AreEqual(notification.reference, "sample-test-ref");

            NotifyAssertions.AssertNotification(notification);
        }
        public void GetLetterNotificationWithIdReturnsNotification()
        {
            SendLetterTestWithPersonalisation();
            Notification notification = this.client.GetNotificationById(this.letterNotificationId);

            Assert.IsNotNull(notification);
            Assert.IsNotNull(notification.id);
            Assert.AreEqual(notification.id, this.letterNotificationId);

            Assert.IsNotNull(notification.body);
            Assert.AreEqual(notification.body, TEST_LETTER_BODY);

            Assert.IsNotNull(notification.subject);
            Assert.AreEqual(notification.subject, TEST_LETTER_SUBJECT);

            NotifyAssertions.AssertNotification(notification);
        }