-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed from address prop from ext model (#269)
- Loading branch information
Showing
6 changed files
with
3 additions
and
19 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 |
---|---|---|
|
@@ -55,7 +55,6 @@ public EmailNotificationOrdersControllerTests(IntegrationTestWebApplicationFacto | |
{ | ||
Body = "email-body", | ||
ContentType = EmailContentType.Html, | ||
FromAddress = "[email protected]", | ||
Recipients = new List<RecipientExt>() { new RecipientExt() { EmailAddress = "[email protected]" }, new RecipientExt() { EmailAddress = "[email protected]" } }, | ||
SendersReference = "senders-reference", | ||
RequestedSendTime = DateTime.UtcNow, | ||
|
@@ -181,8 +180,6 @@ public async Task Post_ServiceReturnsError_ServerError() | |
public async Task Post_ServiceReturnsOrder_Accepted() | ||
{ | ||
// Arrange | ||
string expectedFromAddress = "[email protected]"; | ||
|
||
Mock<IEmailNotificationOrderService> serviceMock = new(); | ||
serviceMock.Setup(s => s.RegisterEmailNotificationOrder(It.IsAny<NotificationOrderRequest>())) | ||
.Callback<NotificationOrderRequest>(orderRequest => | ||
|
@@ -192,7 +189,7 @@ public async Task Post_ServiceReturnsOrder_Accepted() | |
.FirstOrDefault(); | ||
|
||
Assert.NotNull(emailTemplate); | ||
Assert.Equal(expectedFromAddress, emailTemplate.FromAddress); | ||
Assert.Equal(string.Empty, emailTemplate.FromAddress); | ||
}) | ||
.ReturnsAsync((_order, null)); | ||
|
||
|
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 |
---|---|---|
|
@@ -39,7 +39,6 @@ public PostTests(IntegrationTestWebApplicationFactory<EmailNotificationOrdersCon | |
{ | ||
Body = "email-body", | ||
ContentType = EmailContentType.Html, | ||
FromAddress = "[email protected]", | ||
Recipients = new List<RecipientExt>() | ||
{ | ||
new RecipientExt | ||
|
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 |
---|---|---|
|
@@ -128,7 +128,6 @@ public void MapToOrderRequest_RecipientsProvided_AreEquivalent() | |
{ | ||
Body = "email-body", | ||
ContentType = EmailContentType.Html, | ||
FromAddress = "[email protected]", | ||
Recipients = new List<RecipientExt>() { new RecipientExt() { EmailAddress = "[email protected]" }, new RecipientExt() { EmailAddress = "[email protected]" } }, | ||
SendersReference = "senders-reference", | ||
RequestedSendTime = sendTime, | ||
|
@@ -142,7 +141,7 @@ public void MapToOrderRequest_RecipientsProvided_AreEquivalent() | |
Templates = new List<INotificationTemplate>() | ||
{ | ||
new EmailTemplate( | ||
"[email protected]", | ||
string.Empty, | ||
"email-subject", | ||
"email-body", | ||
EmailContentType.Html) | ||
|
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 |
---|---|---|
|
@@ -27,7 +27,6 @@ public void Validate_RecipientProvided_ReturnsTrue() | |
var order = new EmailNotificationOrderRequestExt() | ||
{ | ||
Subject = "This is an email subject", | ||
FromAddress = "[email protected]", | ||
Recipients = new List<RecipientExt>() { new RecipientExt() { Id = "16069412345", EmailAddress = "[email protected]" } }, | ||
Body = "This is an email body" | ||
}; | ||
|
@@ -42,7 +41,6 @@ public void Validate_EmailNotDefinedForRecipient_ReturnFalse() | |
var order = new EmailNotificationOrderRequestExt() | ||
{ | ||
Subject = "This is an email subject", | ||
FromAddress = "[email protected]", | ||
Recipients = new List<RecipientExt>() { new RecipientExt() { Id = "16069412345" } }, | ||
Body = "This is an email body" | ||
}; | ||
|
@@ -59,7 +57,6 @@ public void Validate_SendTimePassed_ReturnsFalse() | |
var order = new EmailNotificationOrderRequestExt() | ||
{ | ||
Subject = "This is an email subject", | ||
FromAddress = "[email protected]", | ||
Recipients = new List<RecipientExt>() { new RecipientExt() { Id = "16069412345", EmailAddress = "[email protected]" } }, | ||
Body = "This is an email body", | ||
RequestedSendTime = DateTime.UtcNow.AddDays(-1) | ||
|
@@ -76,7 +73,6 @@ public void Validate_SubjectMissing_ReturnsFalse() | |
{ | ||
var order = new EmailNotificationOrderRequestExt() | ||
{ | ||
FromAddress = "[email protected]", | ||
Recipients = new List<RecipientExt>() { new RecipientExt() { Id = "16069412345", EmailAddress = "[email protected]" } }, | ||
Body = "This is an email body" | ||
}; | ||
|
@@ -92,7 +88,6 @@ public void Validate_BodyMissing_ReturnsFalse() | |
var order = new EmailNotificationOrderRequestExt() | ||
{ | ||
Subject = "This is an email subject", | ||
FromAddress = "[email protected]", | ||
Recipients = new List<RecipientExt>() { new RecipientExt() { Id = "16069412345", EmailAddress = "[email protected]" } }, | ||
}; | ||
|
||
|