IdentitySpecificationTestBase<TUser,TRole,TKey> Class

Definition

Base class for tests that exercise basic identity functionality that all stores should support.

generic <typename TUser, typename TRole, typename TKey>
 where TUser : class where TRole : class where TKey : IEquatable<TKey>public ref class IdentitySpecificationTestBase abstract : Microsoft::AspNetCore::Identity::Test::UserManagerSpecificationTestBase<TUser, TKey>
public abstract class IdentitySpecificationTestBase<TUser,TRole,TKey> : Microsoft.AspNetCore.Identity.Test.UserManagerSpecificationTestBase<TUser,TKey> where TUser : class where TRole : class where TKey : IEquatable<TKey>
type IdentitySpecificationTestBase<'User, 'Role, 'Key (requires 'User : null and 'Role : null and 'Key :> IEquatable<'Key>)> = class
    inherit UserManagerSpecificationTestBase<'User, 'Key (requires 'User : null and 'Key :> IEquatable<'Key>)>
Public MustInherit Class IdentitySpecificationTestBase(Of TUser, TRole, TKey)
Inherits UserManagerSpecificationTestBase(Of TUser, TKey)

Type Parameters

TUser

The type of the user.

TRole

The type of the role.

TKey

The primary key type.

Inheritance
IdentitySpecificationTestBase<TUser,TRole,TKey>
Derived

Constructors

IdentitySpecificationTestBase<TUser,TRole,TKey>()

Fields

_errorDescriber

Error describer.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
NullValue

Null value.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)

Methods

AddDupeEmailAllowedByDefault()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
AddDupeEmailFailsWhenUniqueEmailRequired()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
AddDupeLoginFails()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
AddDupeUserNameFails()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
AddPasswordFailsIfAlreadyHave()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
AddRoleStore(IServiceCollection, Object)

Adds an IRoleStore to services for the test.

AddUserStore(IServiceCollection, Object)

Adds an IUserStore to services for the test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
AddUserToRoleFailsIfAlreadyInRole()

Test.

AddUserToRolesIgnoresDuplicates()

Test.

BadValidatorBlocksCreateRole()

Test.

BadValidatorBlocksRoleUpdate()

Test.

CanAddRemoveRoleClaim()

Test.

CanAddRemoveUserClaim()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanAddUsersToRole()

Test.

CanChainPasswordValidators()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanChainRoleValidators()

Test.

CanChainUserValidators()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanChangeEmail()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanChangeEmailWithDifferentTokenProvider()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanChangePassword()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanChangePhoneNumber()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanConfirmEmailWithStaticToken()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanCreateRoleTest()

Test.

CanCreateUserAddLogin()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanCreateUserAddRemoveLogin()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanCreateUserLoginAndAddPassword()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanCreateUserNoPassword()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanDeleteRole()

Test.

CanDeleteUser()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanEnableLockoutManuallyAndLockout()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanFindByEmail()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanFindById()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanFindRoleByNameWithManager()

Test.

CanFindRoleWithManager()

Test.

CanFindUsersViaUserQuerable()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanGenerateAndVerifyUserTokenWithStaticTokenProvider()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanGetRolesForUser()

Test.

CanGetSetUpdateAndRemoveUserToken()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanGetUsersInRole()

Test.

CanGetUsersWithClaims()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanGetValidTwoFactor()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanQueryableRoles()

Test.

CanRedeemRecoveryCodeOnlyOnce()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanRemovePassword()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanRemoveUsersFromRole()

Test.

CanReplaceUserClaim()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanResetPasswordWithStaticTokenProvider()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanRoleFindById()

Test.

CanRoleFindByName()

Test.

CanUpdatePasswordUsingHasher()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanUpdateRoleName()

Test.

CanUpdateUserName()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CanVerifyPhoneNumber()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ChangeEmailFailsWithEmail()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ChangeEmailFailsWithWrongToken()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ChangeEmailTokensFailsAfterEmailChanged()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ChangePasswordFallsIfPasswordWrong()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ChangePhoneNumberFailsWithWrongPhoneNumber()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ChangePhoneNumberFailsWithWrongToken()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ChangePhoneNumberTokenIsInt()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ChangePhoneNumberWithCustomProvider()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CheckSetEmailValidatesUser()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CheckSetUserNameValidatesUser()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ConfirmEmailFalseByDefaultTest()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ConfirmEmailWithStaticTokenFailsWithWrongToken()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ConfirmTokenFailsAfterPasswordChange()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CreateManager(Object, IServiceCollection, Action<IServiceCollection>)

Creates the user manager used for tests.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CreateRoleFailsIfExists()

Test.

CreateRoleManager(Object, IServiceCollection)

Creates the role manager for tests.

CreateTestContext()

Creates the context object for a test, typically a DbContext.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CreateTestRole(String, Boolean)

Creates a new test role instance.

CreateTestUser(String, String, String, Boolean, Nullable<DateTimeOffset>, Boolean)

Create a new test user instance.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CreateUpdatesSecurityStamp()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
CreateUserWillSetCreateDateOnlyIfSupported()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
EmailFactorFailsAfterSecurityStampChangeTest()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
EnableTwoFactorChangesSecurityStamp()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
GenerateTwoFactorWithUnknownFactorProviderWillThrow()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
GenerateUsers(String, Int32)

Generate count users with a name prefix.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
GetValidTwoFactorTestEmptyWithNoProviders()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
LockoutEndToUtcNowMinus1SecInUserShouldNotBeLockedOut()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
LockoutEndToUtcNowPlus5ShouldBeLockedOut()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
LockoutEndToUtcNowSubOneSecondWithManagerShouldNotBeLockedOut()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
LockoutFailsIfNotEnabled()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
NullableDateTimeOperationTest()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
PasswordValidatorCanBlockAddPassword()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
PasswordValidatorCanBlockChangePassword()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
PasswordValidatorCanBlockCreateUser()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
PasswordValidatorCanBlockResetPasswordWithStaticTokenProvider()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
PhoneFactorFailsAfterSecurityStampChangeTest()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
RecoveryCodesInvalidAfterReplace()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
RemoveClaimOnlyAffectsUser()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
RemoveUserFromRoleWithMultipleRoles()

Test.

RemoveUserNotInRoleFails()

Test.

ReplaceUserClaimOnlyAffectsUser()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ResetAccessCountPreventsLockout()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ResetAuthenticatorKeyUpdatesSecurityStamp()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ResetPasswordWithStaticTokenProviderFailsWithWrongToken()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
RoleNameEqualsPredicate(String)

Query used to do name equality checks.

RoleNameStartsWithPredicate(String)

Query used to do user name prefix matching.

SetPhoneNumberTest()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
SetupBuilder(IServiceCollection, Object)

Setup the IdentityBuilder

SetupIdentityServices(IServiceCollection, Object)

Configure the service collection used for tests.

SetUserNameUpdatesSecurityStamp()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
SetUserPasswordHash(TUser, String)

Set the user's password hash.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
ShouldSkipDbTests()

If true, tests that require a database will be skipped.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
SingleFailureLockout()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
TwoFailureLockout()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UpdateSecurityStampActuallyChanges()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UserLockedOutWithDateTimeLocalKindNowPlus30()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UserNameEqualsPredicate(String)

Query used to do name equality checks.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UserNameStartsWithPredicate(String)

Query used to do user name prefix matching.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UserNotLockedOutWithNullDateTimeAndIsSetToNullDate()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UserValidatorBlocksInvalidEmailsWhenRequiresUniqueEmail(String)

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UserValidatorBlocksShortEmailsWhenRequiresUniqueEmail(String)

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UserValidatorCanBlockCreate()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
UserValidatorCanBlockUpdate()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
VerifyTokenFromWrongTokenProviderFails()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)
VerifyWithWrongSmsTokenFails()

Test.

(Inherited from UserManagerSpecificationTestBase<TUser,TKey>)

Applies to