Ejemplo n.º 1
0
        public void Mailer_renders_welcome_email()
        {
            var path = Path.Combine(Environment.CurrentDirectory, "..\\..\\..\\BackgroundWorker\\EmailTemplates");
            var mailer = new Mailer(path);

            var email = mailer.Welcome();
            var body = new StreamReader(email.Mail.AlternateViews[0].ContentStream).ReadToEnd();

            Assert.Equal("Hello", body);
        }
Ejemplo n.º 2
0
        public void Mailer_renders_goodbye_email()
        {
            var path = Path.Combine(Environment.CurrentDirectory, "..\\..\\..\\BackgroundWorker\\EmailTemplates");
            var mailer = new Mailer(path);

            var email = mailer.Goodbye(new GoodbyeEmailModel { UserName = "******" });
            var body = new StreamReader(email.Mail.AlternateViews[0].ContentStream).ReadToEnd();

            Assert.Equal("Goodbye Test", body);
        }