public void Can_sign() { var msg = new MailMessage("[email protected]", "[email protected]", "subject", "body"); //Console.WriteLine(msg.GetText()); Assert.IsTrue(msg.CanSign()); }
public void Cannot_sign_attachment() { var msg = new MailMessage("[email protected]", "[email protected]", "subject", "body"); var path = Path.GetDirectoryName( Assembly.GetExecutingAssembly().Location) + @"\MailMessage\Attachment.htm"; var attachment = new Attachment(path, new ContentType(@"text/html")); msg.Attachments.Add(attachment); //Console.WriteLine(msg.GetText()); Assert.IsFalse(msg.CanSign()); }
public void Cannot_sign_multiple_alt_views() { var msg = new MailMessage("[email protected]", "[email protected]", "subject", "body"); var htmlView = AlternateView.CreateAlternateViewFromString("<p>some html</p>", new ContentType(@"text/html")); msg.AlternateViews.Add(htmlView); //Console.WriteLine(msg.GetText()); Assert.IsFalse(msg.CanSign()); }