IdentitySpecificationTestBase<TUser,TRole> Class

Definition

Common functionality tests that all verifies user manager functionality regardless of store implementation

generic <typename TUser, typename TRole>
 where TUser : class where TRole : classpublic ref class IdentitySpecificationTestBase abstract : Microsoft::AspNetCore::Identity::Test::IdentitySpecificationTestBase<TUser, TRole, System::String ^>
public abstract class IdentitySpecificationTestBase<TUser,TRole> : Microsoft.AspNetCore.Identity.Test.IdentitySpecificationTestBase<TUser,TRole,string> where TUser : class where TRole : class
type IdentitySpecificationTestBase<'User, 'Role (requires 'User : null and 'Role : null)> = class
    inherit IdentitySpecificationTestBase<'User, 'Role, string (requires 'User : null and 'Role : null)>
Public MustInherit Class IdentitySpecificationTestBase(Of TUser, TRole)
Inherits IdentitySpecificationTestBase(Of TUser, TRole, String)

Type Parameters

TUser

The type of the user.

TRole

The type of the role.

Inheritance
IdentitySpecificationTestBase<TUser,TRole>

Constructors

IdentitySpecificationTestBase<TUser,TRole>()

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.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
AddUserStore(IServiceCollection, Object)

Adds an IUserStore to services for the test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
AddUserToRolesIgnoresDuplicates()

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
BadValidatorBlocksCreateRole()

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
BadValidatorBlocksRoleUpdate()

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanAddRemoveRoleClaim()

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanAddRemoveUserClaim()

Test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanChainPasswordValidators()

Test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
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.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
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.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
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.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanFindRoleWithManager()

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanFindUsersViaUserQuerable()

Test.

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

Test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanGetSetUpdateAndRemoveUserToken()

Test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanGetUsersWithClaims()

Test.

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

Test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanRedeemRecoveryCodeOnlyOnce()

Test.

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

Test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanReplaceUserClaim()

Test.

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

Test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanRoleFindByName()

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CanUpdatePasswordUsingHasher()

Test.

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

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
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.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
CreateRoleManager(Object, IServiceCollection)

Creates the role manager for tests.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
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.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
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.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
RemoveUserNotInRoleFails()

Test.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
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.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
RoleNameStartsWithPredicate(String)

Query used to do user name prefix matching.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
SetPhoneNumberTest()

Test.

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

Setup the IdentityBuilder

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
SetupIdentityServices(IServiceCollection, Object)

Configure the service collection used for tests.

(Inherited from IdentitySpecificationTestBase<TUser,TRole,TKey>)
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