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); }
public void Should_render_template() { var result = builder.GetEmailContent(testView, new Dictionary <string, object>()); result.ShouldEqual("Test Email"); }