public void Test_EnablingUnsubscribe_text_html_bypass() { var mail = BasicMailBuilder .EnableUnsubscribe( "If you would like to unsubscribe and stop receiving these emails click here: <% %>.", "If you would like to unsubscribe and stop receiving these emails <% click here %>.") .Build(); Assert.IsFalse(string.IsNullOrEmpty(mail.Header.JsonString())); }
public void Test_EnablingUnsubscribe_replace() { var mail = BasicMailBuilder .EnableUnsubscribe("replace") .Build(); var message = new SendGridMessage(); message.EnableUnsubscribe("replace"); Assert.IsFalse(string.IsNullOrEmpty(message.Header.JsonString())); Assert.AreEqual(message.Header.JsonString(), mail.Header.JsonString()); }
public void Test_EnablingUnsubscribe_text_html() { var mail = BasicMailBuilder .EnableUnsubscribe( "If you would like to unsubscribe and stop receiving these emails click here: <% %>.", "If you would like to unsubscribe and stop receiving these emails click <% here %>.") .Build(); var message = new SendGridMessage(); message.EnableUnsubscribe( "If you would like to unsubscribe and stop receiving these emails click here: <% %>.", "If you would like to unsubscribe and stop receiving these emails click <% here %>."); Assert.IsFalse(string.IsNullOrEmpty(message.Header.JsonString())); Assert.AreEqual(message.Header.JsonString(), mail.Header.JsonString()); }