public void UpdateTemplateBody_WhenCalled_UpdateTemplateBody()
        {
            _sut = new NotificationTemplate(EmailNotification.Instance, CoursePublishedEvent.Instance,
                                            isSystemNotification: true);

            _sut.UpdateTemplateBody("new body");

            Assert.That(_sut.TemplateBody, Is.EqualTo("new body"));
        }
        public static NotificationTemplate Create()
        {
            var template = new NotificationTemplate(EmailNotification.Instance,
                                                    OrganizationSigningUpInitializedEvent.Instance, isSystemNotification: true);

            template.UpdateTemplateSubject("Verify your email and complete your registration");

            var stringBuilder = new StringBuilder();

            stringBuilder.Append("Hi,");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("Please click on the link below to complete the signing up process :");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("{{ data.link_to_complete_signing_up }}");
            stringBuilder.Append("<br/> <br/>");

            template.UpdateTemplateBody(stringBuilder.ToString());

            return(template);
        }
        public static NotificationTemplate Create()
        {
            var template = new NotificationTemplate(PushNotification.Instance,
                                                    CoursePublishedEvent.Instance, isSystemNotification: false);

            template.UpdateTemplateSubject("A course has been published !");

            var stringBuilder = new StringBuilder();

            stringBuilder.Append("Hi,");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("The course «{{data.course_name}}» has just been published by {{data.creator_name}}.");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("Enjoy your training course.");
            stringBuilder.Append("<br/> <br/>");

            template.UpdateTemplateBody(stringBuilder.ToString());

            return(template);
        }
        public static NotificationTemplate Create()
        {
            var template = new NotificationTemplate(EmailNotification.Instance,
                                                    UserSigningUpCompletedEvent.Instance, isSystemNotification: true);

            template.UpdateTemplateSubject("Welcome to Solen LMS!");

            var stringBuilder = new StringBuilder();

            stringBuilder.Append("Hi {{data.user_name}},");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("Welcome to  Solen LMS ! ");
            stringBuilder.Append("Your account has been successfully created.");
            stringBuilder.Append("<br/>");
            stringBuilder.Append("Enjoy your learning journey !");
            stringBuilder.Append("<br/> <br/>");

            template.UpdateTemplateBody(stringBuilder.ToString());

            return(template);
        }
        public static NotificationTemplate Create()
        {
            var template = new NotificationTemplate(EmailNotification.Instance,
                                                    OrganizationSigningUpCompletedEvent.Instance, isSystemNotification: true);

            template.UpdateTemplateSubject("Welcome to Solen LMS!");

            var stringBuilder = new StringBuilder();

            stringBuilder.Append("Hi {{data.user_name}},");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("Thank you for your interest in Solen LMS.");
            stringBuilder.Append("Your account has been successfully created.");
            stringBuilder.Append("<br/>");
            stringBuilder.Append("It’s great to have you here! We hope you and your learners will ");
            stringBuilder.Append("enjoy using this platform.");
            stringBuilder.Append("<br/> <br/>");

            template.UpdateTemplateBody(stringBuilder.ToString());

            return(template);
        }
        public static NotificationTemplate Create()
        {
            var template = new NotificationTemplate(EmailNotification.Instance,
                                                    UserSigningUpInitializedEvent.Instance, isSystemNotification: true);

            template.UpdateTemplateSubject("{{data.invited_by}} has invited you to join Solen LMS");

            var stringBuilder = new StringBuilder();

            stringBuilder.Append("Hi,");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("{{data.invited_by}} has invited you to join Solen LMS.");
            stringBuilder.Append("<br/>");
            stringBuilder.Append("Please click on the link below to complete the signing up process :");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("{{ data.link_to_complete_signing_up }}");
            stringBuilder.Append("<br/> <br/>");

            template.UpdateTemplateBody(stringBuilder.ToString());

            return(template);
        }
示例#7
0
        public static NotificationTemplate Create()
        {
            var template = new NotificationTemplate(EmailNotification.Instance,
                                                    PasswordForgottenEvent.Instance, isSystemNotification: true);

            template.UpdateTemplateSubject("Reset Password");

            var stringBuilder = new StringBuilder();

            stringBuilder.Append("Hi,");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("This is a system message in reply to your request to change your password.");
            stringBuilder.Append("<br/>");
            stringBuilder.Append("To reset your password, please open the link below ");
            stringBuilder.Append("and follow the instructions on the page : ");
            stringBuilder.Append("<br/> <br/>");
            stringBuilder.Append("{{ data.link_to_reset_password }}");
            stringBuilder.Append("<br/> <br/>");

            template.UpdateTemplateBody(stringBuilder.ToString());

            return(template);
        }