public void Given_a_model_the_email_should_format_the_email_correctly() { var viewBag = new DynamicViewBag(); var email = _emailFormatter.BuildTemplatedEmailFrom( new SimpleEmailModel { RecipientFirstName = "Michael", ReferenceNumber = "REF123456", Message = "Hello World!", Url = "http://google.com" }, viewBag); ApprovalTests.Approvals.Verify(email.Everything()); }
public void Given_an_email_formatter_when_attempting_to_format_a_message_without_a_language_scope_it_should_throw() { Assert.Throws <InvalidOperationException>(() => _emailFormatter.BuildTemplatedEmailFrom(new SimpleEmailModel())); }