You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/test/Volo.Abp.Identity.Tests/Volo/Abp/Identity/AbpIdentityTestModule.cs

33 lines
1013 B

using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.Modularity;
namespace Volo.Abp.Identity
{
[DependsOn(typeof(AbpIdentityModule), typeof(AbpIdentityEntityFrameworkCoreModule))]
public class AbpIdentityTestModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddEntityFrameworkInMemoryDatabase();
services.Configure<DbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = Guid.NewGuid().ToString();
});
services.Configure<AbpDbContextOptions>(options =>
{
options.Configure(context =>
{
context.DbContextOptions.UseInMemoryDatabase(context.ConnectionString);
});
});
}
}
}