6 instantiations of PocoUser
Microsoft.AspNetCore.Identity.InMemory.Test (6)
ControllerTest.cs (2)
43
var user = new
PocoUser
94
var user = new
PocoUser
FunctionalTest.cs (2)
312
var user = new
PocoUser
("hao");
326
var result = await userManager.CreateAsync(new
PocoUser
("simple"), "aaaaaa");
InMemoryStoreTest.cs (1)
36
return new
PocoUser
InMemoryUserStoreTest.cs (1)
32
return new
PocoUser
43 references to PocoUser
Microsoft.AspNetCore.Identity.InMemory.Test (43)
ControllerTest.cs (14)
36
services.AddIdentity<
PocoUser
, PocoRole>();
37
services.AddSingleton<IUserStore<
PocoUser
>, InMemoryStore<
PocoUser
, PocoRole>>();
38
services.AddSingleton<IRoleStore<PocoRole>, InMemoryStore<
PocoUser
, PocoRole>>();
43
var
user = new PocoUser
48
var userManager = app.ApplicationServices.GetRequiredService<UserManager<
PocoUser
>>();
49
var signInManager = app.ApplicationServices.GetRequiredService<SignInManager<
PocoUser
>>();
87
services.AddIdentity<
PocoUser
, PocoRole>();
88
services.AddSingleton<IUserStore<
PocoUser
>, InMemoryStore<
PocoUser
, PocoRole>>();
89
services.AddSingleton<IRoleStore<PocoRole>, InMemoryStore<
PocoUser
, PocoRole>>();
94
var
user = new PocoUser
98
var userManager = app.ApplicationServices.GetRequiredService<UserManager<
PocoUser
>>();
99
var signInManager = app.ApplicationServices.GetRequiredService<SignInManager<
PocoUser
>>();
FunctionalTest.cs (10)
302
var userManager = context.RequestServices.GetRequiredService<UserManager<
PocoUser
>>();
304
var signInManager = context.RequestServices.GetRequiredService<SignInManager<
PocoUser
>>();
312
var
user = new PocoUser("hao");
331
var
user = await userManager.FindByNameAsync("hao");
343
var
user = await userManager.FindByNameAsync("hao");
349
var
user = await userManager.FindByNameAsync("hao");
381
services.AddIdentityCore<
PocoUser
>()
389
services.AddIdentity<
PocoUser
, PocoRole>().AddDefaultTokenProviders();
391
var store = new InMemoryStore<
PocoUser
, PocoRole>();
392
services.AddSingleton<IUserStore<
PocoUser
>>(store);
InMemoryStore.cs (1)
15
where TUser :
PocoUser
InMemoryStoreTest.cs (9)
11
public class InMemoryStoreTest : IdentitySpecificationTestBase<
PocoUser
, PocoRole>
15
return new InMemoryStore<
PocoUser
, PocoRole>();
20
services.AddSingleton<IUserStore<
PocoUser
>>((InMemoryStore<
PocoUser
, PocoRole>)context);
25
services.AddSingleton<IRoleStore<PocoRole>>((InMemoryStore<
PocoUser
, PocoRole>)context);
28
protected override void SetUserPasswordHash(
PocoUser
user, string hashedPassword)
33
protected override
PocoUser
CreateTestUser(string namePrefix = "", string email = "", string phoneNumber = "",
52
protected override Expression<Func<
PocoUser
, bool>> UserNameEqualsPredicate(string userName) => u => u.UserName == userName;
56
protected override Expression<Func<
PocoUser
, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName, StringComparison.Ordinal);
InMemoryUserStore.cs (1)
22
where TUser :
PocoUser
InMemoryUserStoreTest.cs (8)
12
public class InMemoryUserStoreTest : UserManagerSpecificationTestBase<
PocoUser
, string>, IClassFixture<InMemoryUserStoreTest.Fixture>
16
return new InMemoryUserStore<
PocoUser
>();
21
services.AddSingleton<IUserStore<
PocoUser
>>((InMemoryUserStore<
PocoUser
>)context);
24
protected override void SetUserPasswordHash(
PocoUser
user, string hashedPassword)
29
protected override
PocoUser
CreateTestUser(string namePrefix = "", string email = "", string phoneNumber = "",
42
protected override Expression<Func<
PocoUser
, bool>> UserNameEqualsPredicate(string userName) => u => u.UserName == userName;
44
protected override Expression<Func<
PocoUser
, bool>> UserNameStartsWithPredicate(string userName) => u => u.UserName.StartsWith(userName, StringComparison.Ordinal);