| 12345678910111213141516171819202122232425262728293031323334353637 |
- 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<ApplicationPartManager>()
- .AddApplicationPartsIfNotAddedBefore(typeof(VberAdminWebMvcModule).Assembly);
- }
- }
|