namespace Lion.AbpPro.DataDictionaryManagement { [DependsOn( typeof(AbpAutofacModule), typeof(AbpTestBaseModule), typeof(AbpAuthorizationModule), typeof(DataDictionaryManagementDomainModule) )] public class DataDictionaryManagementTestBaseModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddAlwaysAllowAuthorization(); } public override void OnApplicationInitialization(ApplicationInitializationContext context) { SeedTestData(context); } private static void SeedTestData(ApplicationInitializationContext context) { AsyncHelper.RunSync(async () => { using (var scope = context.ServiceProvider.CreateScope()) { await scope.ServiceProvider .GetRequiredService() .SeedAsync(); } }); } } }