File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
src/Tests/AbpCompanyName.AbpProjectName.Tests Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 152152 <ItemGroup >
153153 <Compile Include =" Properties\AssemblyInfo.cs" />
154154 <Compile Include =" Sessions\SessionAppService_Tests.cs" />
155- <Compile Include =" Sessions\ AbpProjectNameTestBase.cs" />
155+ <Compile Include =" AbpProjectNameTestBase.cs" />
156156 </ItemGroup >
157157 <ItemGroup >
158158 <None Include =" App.config" />
Original file line number Diff line number Diff line change 1515using Castle . MicroKernel . Registration ;
1616using EntityFramework . DynamicFilters ;
1717
18- namespace AbpCompanyName . AbpProjectName . Tests . Sessions
18+ namespace AbpCompanyName . AbpProjectName . Tests
1919{
2020 public abstract class AbpProjectNameTestBase : AbpIntegratedTestBase
2121 {
2222 protected AbpProjectNameTestBase ( )
2323 {
24+ //Seed initial data
25+ UsingDbContext ( context => new InitialDataBuilder ( context ) . Build ( ) ) ;
26+
27+ LoginAsDefaultTenantAdmin ( ) ;
28+ }
29+
30+ protected override void PreInitialize ( )
31+ {
32+ base . PreInitialize ( ) ;
33+
2434 //Fake DbConnection using Effort!
2535 LocalIocManager . IocContainer . Register (
2636 Component . For < DbConnection > ( )
2737 . UsingFactoryMethod ( Effort . DbConnectionFactory . CreateTransient )
2838 . LifestyleSingleton ( )
2939 ) ;
30-
31- //Seed initial data
32- UsingDbContext ( context => new InitialDataBuilder ( context ) . Build ( ) ) ;
33-
34- LoginAsDefaultTenantAdmin ( ) ;
3540 }
3641
3742 protected override void AddModules ( ITypeList < AbpModule > modules )
You can’t perform that action at this time.
0 commit comments