8 types derived from IdentityUser
Identity.DefaultUI.WebSite (1)
Identity.ExternalClaims (1)
IdentitySample.DefaultUI (1)
IdentitySample.Mvc (1)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (4)
21 instantiations of IdentityUser
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (21)
UserStoreTest.cs (16)
34db.Users.Add(new IdentityUser { Id = guid, UserName = guid });
128await Assert.ThrowsAsync<ArgumentNullException>("login", async () => await store.AddLoginAsync(new IdentityUser("fake"), null));
130async () => await store.AddClaimsAsync(new IdentityUser("fake"), null));
132async () => await store.RemoveClaimsAsync(new IdentityUser("fake"), null));
154await Assert.ThrowsAsync<ArgumentNullException>("normalizedRoleName", async () => await store.AddToRoleAsync(new IdentityUser("fake"), null));
155await Assert.ThrowsAsync<ArgumentNullException>("normalizedRoleName", async () => await store.RemoveFromRoleAsync(new IdentityUser("fake"), null));
156await Assert.ThrowsAsync<ArgumentNullException>("normalizedRoleName", async () => await store.IsInRoleAsync(new IdentityUser("fake"), null));
157await Assert.ThrowsAsync<ArgumentException>("normalizedRoleName", async () => await store.AddToRoleAsync(new IdentityUser("fake"), ""));
158await Assert.ThrowsAsync<ArgumentException>("normalizedRoleName", async () => await store.RemoveFromRoleAsync(new IdentityUser("fake"), ""));
159await Assert.ThrowsAsync<ArgumentException>("normalizedRoleName", async () => await store.IsInRoleAsync(new IdentityUser("fake"), ""));
167var user = new IdentityUser { UserName = "New" + guid };
176var userA = new IdentityUser(Guid.NewGuid().ToString());
178var userB = new IdentityUser(Guid.NewGuid().ToString());
188var userA = new IdentityUser(Guid.NewGuid().ToString());
191var userB = new IdentityUser(Guid.NewGuid().ToString());
392return new IdentityUser
68 references to IdentityUser
Identity.DefaultUI.WebSite (3)
IdentitySample.ApiEndpoints (3)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (3)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (55)
UserStoreTest.cs (21)
13public class UserStoreTest : IdentitySpecificationTestBase<IdentityUser, IdentityRole>, IClassFixture<ScratchDatabaseFixture>
55services.AddSingleton<IUserStore<IdentityUser>>(new UserStore<IdentityUser, IdentityRole, IdentityDbContext>((IdentityDbContext)context));
167var user = new IdentityUser { UserName = "New" + guid };
176var userA = new IdentityUser(Guid.NewGuid().ToString());
178var userB = new IdentityUser(Guid.NewGuid().ToString());
188var userA = new IdentityUser(Guid.NewGuid().ToString());
191var userB = new IdentityUser(Guid.NewGuid().ToString());
202var u = CreateTestUser();
212var user = CreateTestUser();
225var user1 = await manager1.FindByIdAsync(user.Id);
226var user2 = await manager2.FindByIdAsync(user.Id);
243var user = CreateTestUser();
256var user2 = await manager2.FindByIdAsync(user.Id);
272var user = CreateTestUser();
285var user1 = await manager1.FindByIdAsync(user.Id);
286var user2 = await manager2.FindByIdAsync(user.Id);
389protected override IdentityUser CreateTestUser(string namePrefix = "", string email = "", string phoneNumber = "",
408protected override void SetUserPasswordHash(IdentityUser user, string hashedPassword)
413protected override Expression<Func<IdentityUser, bool>> UserNameEqualsPredicate(string userName) => u => u.UserName == userName;
420protected override Expression<Func<IdentityUser, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName);
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.Extensions.Identity.Stores (2)