using Abp.AspNetCore; using Abp.AspNetCore.TestBase; using Abp.Modules; using Abp.Reflection.Extensions; using VberAdmin.EntityFrameworkCore; using VberAdmin.Web.Startup; using Microsoft.AspNetCore.Mvc.ApplicationParts; namespace VberAdmin.Web.Tests; [DependsOn( typeof(VberAdminWebMvcModule), typeof(AbpAspNetCoreTestBaseModule) )] public class VberAdminWebTestModule : AbpModule { public VberAdminWebTestModule(VberAdminEfModule abpProjectNameEfModule) { abpProjectNameEfModule.SkipDbContextRegistration = true; } public override void PreInitialize() { Configuration.UnitOfWork.IsTransactional = false; //EF Core InMemory DB does not support transactions. } public override void Initialize() { IocManager.RegisterAssemblyByConvention(typeof(VberAdminWebTestModule).GetAssembly()); } public override void PostInitialize() { IocManager.Resolve() .AddApplicationPartsIfNotAddedBefore(typeof(VberAdminWebMvcModule).Assembly); } }