File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 22using Microsoft . EntityFrameworkCore ;
33using Microsoft . EntityFrameworkCore . Migrations ;
44using Microsoft . EntityFrameworkCore . TestUtilities ;
5- using Microsoft . Extensions . DependencyInjection ;
65using Xunit ;
76
87namespace EntityFrameworkCore . Ydb . FunctionalTests . Migrations ;
@@ -12,13 +11,8 @@ public class YdbMigrationsInfrastructureTest(YdbMigrationsInfrastructureTest.Ydb
1211{
1312 public class YdbMigrationsInfrastructureFixture : MigrationsInfrastructureFixtureBase
1413 {
15- protected override ITestStoreFactory TestStoreFactory => YdbTestStoreFactory . Instance ;
16-
17- protected override IServiceCollection AddServices ( IServiceCollection serviceCollection )
18- {
19- YdbTestStoreFactory . Instance . UseYdbExecutionStrategy = false ;
20- return base . AddServices ( serviceCollection ) ;
21- }
14+ protected override ITestStoreFactory TestStoreFactory =>
15+ new YdbTestStoreFactory ( useYdbExecutionStrategy : false ) ;
2216 }
2317
2418 protected override void GiveMeSomeTime ( DbContext db )
Original file line number Diff line number Diff line change 44
55namespace EntityFrameworkCore . Ydb . FunctionalTests . TestUtilities ;
66
7- public class YdbTestStoreFactory ( string ? additionalSql = null ) : RelationalTestStoreFactory
7+ public class YdbTestStoreFactory ( string ? additionalSql = null , bool useYdbExecutionStrategy = true )
8+ : RelationalTestStoreFactory
89{
910 public static YdbTestStoreFactory Instance { get ; } = new ( ) ;
1011
1112 private readonly string ? _scriptPath = null ;
1213
13- public bool UseYdbExecutionStrategy { get ; set ; } = true ;
14-
1514 public override TestStore Create ( string storeName ) =>
1615 new YdbTestStore ( storeName , _scriptPath , additionalSql ) ;
1716
1817 public override TestStore GetOrCreate ( string storeName )
1918 => new YdbTestStore ( storeName , _scriptPath , additionalSql ) ;
2019
2120 public override IServiceCollection AddProviderServices ( IServiceCollection serviceCollection )
22- => serviceCollection . AddEntityFrameworkYdb ( UseYdbExecutionStrategy ) ;
21+ => serviceCollection . AddEntityFrameworkYdb ( useYdbExecutionStrategy ) ;
2322}
You can’t perform that action at this time.
0 commit comments