Extends Verify to allow verification of SendGrid.
See Milestones for release notes.
Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.
[ModuleInitializer]publicstaticvoidInitialize()=>VerifySendGrid.Initialize();[Fact]publicTaskAttachment(){varcontentBytes="The content"u8.ToArray();varattachment=newAttachment{Filename="name.txt",Content=Convert.ToBase64String(contentBytes),Type="text/html",Disposition="attachment"};returnVerify(attachment);}Results in:
{
Filename: name.txt,
Disposition: attachment,
Type: text/html,
Content: The content
}[Fact]publicTaskSendGridMessage(){varmail=newSendGridMessage{From=new("test@example.com","DX Team"),Subject="Sending with Twilio SendGrid is Fun",PlainTextContent="and easy to do anywhere, even with C#",HtmlContent="<strong>and easy to do anywhere, even with C#</strong>"};mail.AddTo(newEmailAddress("test@example.com","Test User"));returnVerify(mail);}Results in:
{
From: DX Team <test@example.com>,
Personalizations: [
{
To: Test User <test@example.com>
}
],
Subject: Sending with Twilio SendGrid is Fun,
PlainTextContent: and easy to do anywhere, even with C#,
HtmlContent: <strong>and easy to do anywhere, even with C#</strong>
}Grid from The Noun Project.

