// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; namespace Microsoft.AspNetCore.Identity.Test { /// /// Test user class /// public class TestUser : TestUser { /// /// Ctor /// public TestUser() { Id = Guid.NewGuid().ToString(); } /// /// Ctor /// /// public TestUser(string userName) : this() { UserName = userName; } } /// /// Test user /// /// public class TestUser where TKey : IEquatable { /// /// ctor /// public TestUser() { } /// /// ctor /// /// public TestUser(string userName) : this() { UserName = userName; } /// /// Id /// public virtual TKey Id { get; set; } /// /// Name /// public virtual string UserName { get; set; } /// /// normalized user name /// public virtual string NormalizedUserName { get; set; } /// /// Email /// public virtual string Email { get; set; } /// /// normalized email /// public virtual string NormalizedEmail { get; set; } /// /// True if the email is confirmed, default is false /// public virtual bool EmailConfirmed { get; set; } /// /// The salted/hashed form of the user password /// public virtual string PasswordHash { get; set; } /// /// A random value that should change whenever a users credentials change (password changed, login removed) /// public virtual string SecurityStamp { get; set; } /// /// A random value that should change whenever a user is persisted to the store /// public virtual string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString(); /// /// PhoneNumber for the user /// public virtual string PhoneNumber { get; set; } /// /// True if the phone number is confirmed, default is false /// public virtual bool PhoneNumberConfirmed { get; set; } /// /// Is two factor enabled for the user /// public virtual bool TwoFactorEnabled { get; set; } /// /// DateTime in UTC when lockout ends, any time in the past is considered not locked out. /// public virtual DateTimeOffset? LockoutEnd { get; set; } /// /// Is lockout enabled for this user /// public virtual bool LockoutEnabled { get; set; } /// /// Used to record failures for the purposes of lockout /// public virtual int AccessFailedCount { get; set; } /// /// Navigation property /// public virtual ICollection> Roles { get; private set; } = new List>(); /// /// Navigation property /// public virtual ICollection> Claims { get; private set; } = new List>(); /// /// Navigation property /// public virtual ICollection> Logins { get; private set; } = new List>(); /// /// Navigation property /// public virtual ICollection> Tokens { get; private set; } = new List>(); } }