Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="2.3.3" />
<PackageVersion Include="Microsoft.Playwright" Version="1.62.0" />
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Imposter" Version="0.1.9" />
<PackageVersion Include="NUnit" Version="4.6.1" />
<PackageVersion Include="NUnit3TestAdapter" Version="6.3.0" />
<PackageVersion Include="Reqnroll" Version="3.3.4" />
Expand All @@ -43,4 +43,4 @@
<PackageVersion Include="TransactionProcessor.IntegrationTesting.Helpers" Version="2026.8.1" />
<PackageVersion Include="xunit.v3.mtp-v2" Version="4.0.0" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,106 +10,106 @@ public void GetSecurityServiceAddresses_WithDefaultPorts_ReturnsCorrectAddresses
{
// Arrange
var authority = "https://localhost:5001";

// Act
var (authorityAddress, issuerAddress) = AuthenticationHelpers.GetSecurityServiceAddresses(
authority, null, null);

// Assert
authorityAddress.ShouldBe("https://localhost:5001");
issuerAddress.ShouldBe("https://localhost:5001");
}

[Fact]
public void GetSecurityServiceAddresses_WithCustomLocalPort_ReturnsCorrectAuthorityAddress()
{
// Arrange
var authority = "https://localhost:5001";
var securityServiceLocalPort = "6001";

// Act
var (authorityAddress, issuerAddress) = AuthenticationHelpers.GetSecurityServiceAddresses(
authority, securityServiceLocalPort, null);

// Assert
authorityAddress.ShouldBe("https://localhost:6001");
issuerAddress.ShouldBe("https://localhost:5001");
}

[Fact]
public void GetSecurityServiceAddresses_WithCustomPort_ReturnsCorrectIssuerAddress()
{
// Arrange
var authority = "https://localhost:5001";
var securityServicePort = "7001";

// Act
var (authorityAddress, issuerAddress) = AuthenticationHelpers.GetSecurityServiceAddresses(
authority, null, securityServicePort);

// Assert
authorityAddress.ShouldBe("https://localhost:5001");
issuerAddress.ShouldBe("https://localhost:7001");
}

[Fact]
public void GetSecurityServiceAddresses_WithBothCustomPorts_ReturnsCorrectAddresses()
{
// Arrange
var authority = "https://localhost:5001";
var securityServiceLocalPort = "6001";
var securityServicePort = "7001";

// Act
var (authorityAddress, issuerAddress) = AuthenticationHelpers.GetSecurityServiceAddresses(
authority, securityServiceLocalPort, securityServicePort);

// Assert
authorityAddress.ShouldBe("https://localhost:6001");
issuerAddress.ShouldBe("https://localhost:7001");
}

[Fact]
public void GetSecurityServiceAddresses_WithTrailingSlash_RemovesTrailingSlash()
{
// Arrange
var authority = "https://localhost:5001/";

// Act
var (authorityAddress, issuerAddress) = AuthenticationHelpers.GetSecurityServiceAddresses(
authority, null, null);

// Assert
authorityAddress.ShouldBe("https://localhost:5001");
issuerAddress.ShouldBe("https://localhost:5001");
}

[Fact]
public void GetSecurityServiceAddresses_WithPath_PreservesPath()
{
// Arrange
var authority = "https://localhost:5001/auth";
var securityServiceLocalPort = "6001";

// Act
var (authorityAddress, issuerAddress) = AuthenticationHelpers.GetSecurityServiceAddresses(
authority, securityServiceLocalPort, null);

// Assert
authorityAddress.ShouldBe("https://localhost:6001/auth");
issuerAddress.ShouldBe("https://localhost:5001/auth");
}

[Fact]
public void GetSecurityServiceAddresses_WithEmptyPortStrings_UsesDefaultPort()
{
// Arrange
var authority = "https://localhost:5001";

// Act
var (authorityAddress, issuerAddress) = AuthenticationHelpers.GetSecurityServiceAddresses(
authority, string.Empty, string.Empty);

// Assert
authorityAddress.ShouldBe("https://localhost:5001");
issuerAddress.ShouldBe("https://localhost:5001");
Expand Down
Loading
Loading