Ejemplo n.º 1
0
        public void SendOrderConfirmation(Order order)
        {
            var viewdata = new Dictionary <string, object>
            {
                { "order", order }
            };

            var email   = builder.GetEmailContent(OrderConfirmationTemplate, viewdata);
            var subject = "{0}: your order".With(baseService.ShopName);

            sender.Send(new[] { order.Email, baseService.EmailAddress }, subject, email, true);
        }
Ejemplo n.º 2
0
        public void Should_render_template()
        {
            var result = builder.GetEmailContent(testView, new Dictionary <string, object>());

            result.ShouldEqual("Test Email");
        }