-
-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Unit Test with the ReplyTo fluent method
- Loading branch information
Reid Roper
committed
Jan 11, 2024
1 parent
0340cc8
commit d3c682b
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)] | ||
|