Fix tests
This commit is contained in:
parent
0235d1aa57
commit
e7a7a71d39
|
|
@ -23,11 +23,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test
|
||||||
public async Task CanCreateUsingAddRoleManager()
|
public async Task CanCreateUsingAddRoleManager()
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
#if NET45
|
|
||||||
// services.AddEntityFramework().AddSqlServer();
|
|
||||||
//#else
|
|
||||||
services.AddEntityFramework().AddInMemoryStore();
|
services.AddEntityFramework().AddInMemoryStore();
|
||||||
#endif
|
|
||||||
// TODO: this should construct a new instance of InMemoryStore
|
// TODO: this should construct a new instance of InMemoryStore
|
||||||
var store = new EntityRoleStore<EntityRole>(new IdentityContext());
|
var store = new EntityRoleStore<EntityRole>(new IdentityContext());
|
||||||
services.AddIdentity<EntityUser, EntityRole>(s =>
|
services.AddIdentity<EntityUser, EntityRole>(s =>
|
||||||
|
|
@ -45,11 +41,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test
|
||||||
public async Task CanCreateRoleWithSingletonManager()
|
public async Task CanCreateRoleWithSingletonManager()
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
#if NET45
|
|
||||||
// services.AddEntityFramework().AddSqlServer())
|
|
||||||
//#else
|
|
||||||
services.AddEntityFramework().AddInMemoryStore();
|
services.AddEntityFramework().AddInMemoryStore();
|
||||||
#endif
|
|
||||||
services.AddTransient<DbContext, IdentityContext>();
|
services.AddTransient<DbContext, IdentityContext>();
|
||||||
services.AddTransient<IRoleStore<EntityRole>, EntityRoleStore<EntityRole>>();
|
services.AddTransient<IRoleStore<EntityRole>, EntityRoleStore<EntityRole>>();
|
||||||
//todo: services.AddSingleton<RoleManager<EntityRole>, RoleManager<EntityRole>>();
|
//todo: services.AddSingleton<RoleManager<EntityRole>, RoleManager<EntityRole>>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue