public static void SetupTest(this AbpServiceOptions options, Action <TestOptions> testOptionsAction) { options.IocManager = new IocManager(); var testOptions = new TestOptions(); testOptions.Modules.Add <AbpAspNetCoreTestBaseModule>(); testOptionsAction(testOptions); options.IocManager.RegisterIfNot <IModuleFinder, TestModuleFinder>(); options.IocManager.RegisterIfNot <IAbpSession, TestAbpSession>(); var modules = options.IocManager.Resolve <TestModuleFinder>().Modules; foreach (var module in testOptions.Modules) { modules.Add(module); } }
public static void SetupTest(this AbpServiceOptions options) { options.IocManager = new IocManager(); options.IocManager.RegisterIfNot <IAbpSession, TestAbpSession>(); }
public static void SetupTest(this AbpServiceOptions options) { options.SetupTest(testOptions => { }); }