protected void InitializeAbp() { LocalIocManager.Register <IAbpSession, TestAbpSession>(); PreInitialize(); AbpBootstrapper.Initialize(); AbpSession = LocalIocManager.Resolve <TestAbpSession>(); }
protected AbpAspNetCoreIntegratedTestBase() { var builder = CreateWebHostBuilder(); Server = CreateTestServer(builder); Client = Server.CreateClient(); ServiceProvider = Server.Host.Services; IocManager = ServiceProvider.GetRequiredService <IIocManager>(); AbpSession = ServiceProvider.GetRequiredService <TestAbpSession>(); }
protected AbpIntegratedTestBase() { LocalIocManager = new IocManager(); LocalIocManager.Register <IModuleFinder, TestModuleFinder>(); LocalIocManager.Register <IAbpSession, TestAbpSession>(); AddModules(LocalIocManager.Resolve <TestModuleFinder>().Modules); PreInitialize(); _bootstrapper = new AbpBootstrapper(LocalIocManager); _bootstrapper.Initialize(); AbpSession = LocalIocManager.Resolve <TestAbpSession>(); }
protected void InitializeAbp() { LocalIocManager.Register <IModuleFinder, TestModuleFinder>(); LocalIocManager.Register <IAbpSession, TestAbpSession>(); var modules = LocalIocManager.Resolve <TestModuleFinder>().Modules; modules.Add <AbpTestBaseModule>(); AddModules(modules); PreInitialize(); AbpBootstrapper.Initialize(); AbpSession = LocalIocManager.Resolve <TestAbpSession>(); }