Skip to content

Commit a0e368d

Browse files
committed
Reduntant method removed
1 parent b8673d5 commit a0e368d

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed
Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
using System.Reflection;
21
using Abp.AspNetCore.TestBase;
32
using Abp.Modules;
43
using Abp.Reflection.Extensions;
5-
using AbpCompanyName.AbpProjectName.EntityFrameworkCore;
64
using AbpCompanyName.AbpProjectName.Web.Startup;
7-
using Castle.MicroKernel.Registration;
8-
using Castle.Windsor.MsDependencyInjection;
9-
using Microsoft.EntityFrameworkCore;
10-
using Microsoft.Extensions.DependencyInjection;
11-
125
namespace AbpCompanyName.AbpProjectName.Web.Tests
136
{
147
[DependsOn(
@@ -20,33 +13,11 @@ public class AbpProjectNameWebTestModule : AbpModule
2013
public override void PreInitialize()
2114
{
2215
Configuration.UnitOfWork.IsTransactional = false; //EF Core InMemory DB does not support transactions.
23-
SetupInMemoryDb();
2416
}
2517

2618
public override void Initialize()
2719
{
2820
IocManager.RegisterAssemblyByConvention(typeof(AbpProjectNameWebTestModule).GetAssembly());
2921
}
30-
31-
private void SetupInMemoryDb()
32-
{
33-
var services = new ServiceCollection()
34-
.AddEntityFrameworkInMemoryDatabase();
35-
36-
var serviceProvider = WindsorRegistrationHelper.CreateServiceProvider(
37-
IocManager.IocContainer,
38-
services
39-
);
40-
41-
var builder = new DbContextOptionsBuilder<AbpProjectNameDbContext>();
42-
builder.UseInMemoryDatabase().UseInternalServiceProvider(serviceProvider);
43-
44-
IocManager.IocContainer.Register(
45-
Component
46-
.For<DbContextOptions<AbpProjectNameDbContext>>()
47-
.Instance(builder.Options)
48-
.LifestyleSingleton()
49-
);
50-
}
5122
}
5223
}

0 commit comments

Comments
 (0)