-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
5 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
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
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 |
---|---|---|
|
@@ -214,6 +214,30 @@ public async Task SendEmail_WithoutToAndCcAndBccHeaders_ShouldThrowsException() | |
Assert.True(result.Errors.Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task SendOfflineEmailHasNoResponse() | ||
{ | ||
// Arrange | ||
var message = new MailMessage | ||
{ | ||
To = "[email protected]", | ||
Subject = "Test", | ||
Body = "Test Message" | ||
}; | ||
var settings = new SmtpSettings | ||
{ | ||
DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory | ||
}; | ||
|
||
var smtp = CreateSmtpService(settings); | ||
|
||
// Act | ||
var result = await smtp.SendAsync(message); | ||
|
||
// Assert | ||
Assert.Null(result.Response); | ||
} | ||
|
||
private async Task<string> SendEmailAsync(MailMessage message, string defaultSender = null) | ||
{ | ||
var pickupDirectoryPath = Path.Combine(Directory.GetCurrentDirectory(), "Email"); | ||
|