using Abp.AspNetCore;
|
|
using Abp.AspNetCore.TestBase;
|
|
using Abp.Modules;
|
|
using Abp.Reflection.Extensions;
|
|
using MeetingSchedule.EntityFrameworkCore;
|
|
using MeetingSchedule.Web.Startup;
|
|
using Microsoft.AspNetCore.Mvc.ApplicationParts;
|
|
|
|
namespace MeetingSchedule.Web.Tests
|
|
{
|
|
[DependsOn(
|
|
typeof(MeetingScheduleWebMvcModule),
|
|
typeof(AbpAspNetCoreTestBaseModule)
|
|
)]
|
|
public class MeetingScheduleWebTestModule : AbpModule
|
|
{
|
|
public MeetingScheduleWebTestModule(MeetingScheduleEntityFrameworkModule abpProjectNameEntityFrameworkModule)
|
|
{
|
|
abpProjectNameEntityFrameworkModule.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(MeetingScheduleWebTestModule).GetAssembly());
|
|
}
|
|
|
|
public override void PostInitialize()
|
|
{
|
|
IocManager.Resolve<ApplicationPartManager>()
|
|
.AddApplicationPartsIfNotAddedBefore(typeof(MeetingScheduleWebMvcModule).Assembly);
|
|
}
|
|
}
|
|
}
|