Skip to content

Repository files navigation

Verify.SendGrid

DiscussionsBuild statusNuGet Status

Extends Verify to allow verification of SendGrid.

See Milestones for release notes.

Sponsors

Entity Framework Extensions

Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.

Entity Framework Extensions

Developed using JetBrains IDEs

JetBrains logo.

NuGet

Usage

[ModuleInitializer]publicstaticvoidInitialize()=>VerifySendGrid.Initialize();

snippet source | anchor

Attachment

[Fact]publicTaskAttachment(){varcontentBytes="The content"u8.ToArray();varattachment=newAttachment{Filename="name.txt",Content=Convert.ToBase64String(contentBytes),Type="text/html",Disposition="attachment"};returnVerify(attachment);}

snippet source | anchor

Results in:

{
Filename: name.txt,
Disposition: attachment,
Type: text/html,
Content: The content
}

snippet source | anchor

SendGridMessage

[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);}

snippet source | anchor

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>
}

snippet source | anchor

Icon

Grid from The Noun Project.

About

Extends Verify to allow verification of SendGrid.

Resources

Code of conduct

Stars

0 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages