Class ExternalLoginAccountResolverTests
- Namespace
- ProjectTemplate.Web.Tests
- Assembly
- ProjectTemplate.Web.Tests.dll
Provides tests for the EF Core external login account-linking resolver.
public sealed class ExternalLoginAccountResolverTests
- Inheritance
-
ExternalLoginAccountResolverTests
- Inherited Members
Methods
ExternalLoginAccount_DoesNotExposeProviderTokenStorageProperties()
Verifies that the default external login persistence model does not include token storage properties.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalLoginAccountResolverTests.cs", 268)]
public void ExternalLoginAccount_DoesNotExposeProviderTokenStorageProperties()
ExternalLoginAccounts_DuplicateProviderUserId_ThrowsDbUpdateException()
Verifies that duplicate provider/user keys are rejected by the relational database index.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalLoginAccountResolverTests.cs", 230)]
public Task ExternalLoginAccounts_DuplicateProviderUserId_ThrowsDbUpdateException()
Returns
- Task
A task that represents the asynchronous test operation.
FindByLocalUserIdAsync_EmptyLocalUserId_ReturnsEmptyResult()
Verifies that an empty local user ID returns an empty result set.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalLoginAccountResolverTests.cs", 209)]
public Task FindByLocalUserIdAsync_EmptyLocalUserId_ReturnsEmptyResult()
Returns
- Task
A task that represents the asynchronous test operation.
FindByLocalUserIdAsync_ExistingLocalUserId_ReturnsLinkedAccounts()
Verifies that all external login links for a local user are returned.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalLoginAccountResolverTests.cs", 150)]
public Task FindByLocalUserIdAsync_ExistingLocalUserId_ReturnsLinkedAccounts()
Returns
- Task
A task that represents the asynchronous test operation.
FindByProviderUserIdAsync_BlankLookupValues_ReturnsNull(string, string)
Verifies that blank provider lookup values return null without querying for an invalid link.
[Theory("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalLoginAccountResolverTests.cs", 86)]
[InlineData(new object?[] { "", "provider-user-id" })]
[InlineData(new object?[] { " ", "provider-user-id" })]
[InlineData(new object?[] { "GitHub", "" })]
[InlineData(new object?[] { "GitHub", " " })]
public Task FindByProviderUserIdAsync_BlankLookupValues_ReturnsNull(string providerName, string providerUserId)
Parameters
Returns
- Task
A task that represents the asynchronous test operation.
FindByProviderUserIdAsync_ExistingProviderUserId_ReturnsLinkedAccount()
Verifies that an existing provider/user key resolves to the linked external login account.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalLoginAccountResolverTests.cs", 21)]
public Task FindByProviderUserIdAsync_ExistingProviderUserId_ReturnsLinkedAccount()
Returns
- Task
A task that represents the asynchronous test operation.
FindByProviderUserIdAsync_TrimmedLookupValues_ReturnsLinkedAccount()
Verifies that lookup values are trimmed before provider/user key matching.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalLoginAccountResolverTests.cs", 114)]
public Task FindByProviderUserIdAsync_TrimmedLookupValues_ReturnsLinkedAccount()
Returns
- Task
A task that represents the asynchronous test operation.
FindByProviderUserIdAsync_UnknownProviderUserId_ReturnsNull()
Verifies that an unknown provider/user key returns null.
[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/ExternalLoginAccountResolverTests.cs", 64)]
public Task FindByProviderUserIdAsync_UnknownProviderUserId_ReturnsNull()
Returns
- Task
A task that represents the asynchronous test operation.