Skip to content

Commit

Permalink
Rename back to Port to avoid breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
barthamark committed Feb 8, 2025
1 parent c930207 commit b11ede2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Lombiq.Tests.UI/Extensions/EmailUITestContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static async Task ConfigureSmtpSettingsAsync(
await context.SetCheckboxValueAsync(byIsEnabled, isChecked: true);
}

port ??= context.Configuration?.SmtpServiceConfiguration?.Context?.SmtpPort;
port ??= context.Configuration?.SmtpServiceConfiguration?.Context?.Port;
if (!port.HasValue)
{
throw new InvalidOperationException(
Expand Down Expand Up @@ -212,7 +212,7 @@ public static async Task CreateAndUseLocalSmtpClientAsync(this UITestContext con
var client = new SmtpClient();
await client.ConnectAsync(
context.SmtpServiceRunningContext.Host,
context.SmtpServiceRunningContext.SmtpPort,
context.SmtpServiceRunningContext.Port,
useSsl: false);

try
Expand Down
6 changes: 3 additions & 3 deletions Lombiq.Tests.UI/Services/SmtpService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ public class SmtpServiceConfiguration

public class SmtpServiceRunningContext
{
public int SmtpPort { get; }
public int Port { get; }
public int ImapPort { get; set; }
public string Host => "localhost";
public Uri WebUIUri { get; }

public SmtpServiceRunningContext(int smtpPort, int imapPort, Uri webUIUri)
public SmtpServiceRunningContext(int port, int imapPort, Uri webUIUri)
{
SmtpPort = smtpPort;
Port = port;
ImapPort = imapPort;
WebUIUri = webUIUri;
}
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.Tests.UI/Services/UITestExecutionSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ Task SmtpServiceBeforeAppStartHandlerAsync(OrchardCoreAppStartContext context, I
.AddWithValue("OrchardCore:OrchardCore_Email_Smtp:EnableSmtp", value: true)
.AddWithValue("OrchardCore:OrchardCore_Email_Smtp:Host", value: "localhost")
.AddWithValue("OrchardCore:OrchardCore_Email_Smtp:RequireCredentials", value: false)
.AddWithValue("OrchardCore:OrchardCore_Email_Smtp:Port", value: smtpContext.SmtpPort)
.AddWithValue("OrchardCore:OrchardCore_Email_Smtp:Port", value: smtpContext.Port)
.AddWithValue("OrchardCore:OrchardCore_Email_Smtp:DefaultSender", value: "sender@example.com");
return Task.CompletedTask;
}
Expand Down

0 comments on commit b11ede2

Please sign in to comment.