Skip to content

Commit

Permalink
Adding Unit Test with the ReplyTo fluent method
Browse files Browse the repository at this point in the history
  • Loading branch information
Reid Roper committed Jan 11, 2024
1 parent 0340cc8 commit d3c682b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Src/UnitTests/MailerUnitTests/Mail/SmtpMailerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,24 @@ public async Task SmtpMailerRenderSucessful()
}


[Fact]
public async Task SmtpMailerRenderWithReplyToSucessful()
{
var renderer = RazorRendererFactory.MakeInstance(new ConfigurationBuilder().Build());
var mailer = new SmtpMailer(renderer, "dummy", 1, "dummy", "dummy");

string message = await mailer.RenderAsync(
new GenericHtmlMailable()
.Subject("test")
.From("[email protected]")
.ReplyTo("[email protected]")
.To("[email protected]")
.Html("<html></html>")
);

Assert.Equal("<html></html>", message);
}

[Theory]
[InlineData("", "", false)]
[InlineData(null, "", false)]
Expand Down

0 comments on commit d3c682b

Please sign in to comment.