77using Microsoft . EntityFrameworkCore ;
88using Pomelo . EntityFrameworkCore . MySql . Infrastructure . Internal ;
99using Xunit ;
10+ using CompatHelper = Pomelo . EntityFrameworkCore . MySql . Json . Microsoft . EFCoreCompatibilityHelper ;
1011
1112namespace Pomelo . EntityFrameworkCore . MySql . FunctionalTests
1213{
@@ -27,7 +28,7 @@ public EFCoreCompatibilityTests(CompatibilityTestFixture fixture)
2728 public void EFCoreVersion_IsDetected ( )
2829 {
2930 // Verify that version detection works
30- var version = EFCoreCompatibilityHelper . EFCoreVersion ;
31+ var version = CompatHelper . EFCoreVersion ;
3132 Assert . NotNull ( version ) ;
3233 Assert . True ( version . Major >= 8 , "Should be using EF Core 8 or greater" ) ;
3334 }
@@ -36,19 +37,19 @@ public void EFCoreVersion_IsDetected()
3637 public void VersionFlags_AreSetCorrectly ( )
3738 {
3839 // Test version detection flags
39- var isEFCore8OrGreater = EFCoreCompatibilityHelper . IsEFCore8OrGreater ;
40- var isEFCore9OrGreater = EFCoreCompatibilityHelper . IsEFCore9OrGreater ;
41- var isEFCore10OrGreater = EFCoreCompatibilityHelper . IsEFCore10OrGreater ;
40+ var isEFCore8OrGreater = CompatHelper . IsEFCore8OrGreater ;
41+ var isEFCore9OrGreater = CompatHelper . IsEFCore9OrGreater ;
42+ var isEFCore10OrGreater = CompatHelper . IsEFCore10OrGreater ;
4243
4344 Assert . True ( isEFCore8OrGreater , "Should support EF Core 8+" ) ;
4445
4546 // These will be true based on the actual EF Core version being used
46- if ( EFCoreCompatibilityHelper . EFCoreVersion . Major >= 9 )
47+ if ( CompatHelper . EFCoreVersion . Major >= 9 )
4748 {
4849 Assert . True ( isEFCore9OrGreater ) ;
4950 }
5051
51- if ( EFCoreCompatibilityHelper . EFCoreVersion . Major >= 10 )
52+ if ( CompatHelper . EFCoreVersion . Major >= 10 )
5253 {
5354 Assert . True ( isEFCore10OrGreater ) ;
5455 }
@@ -138,19 +139,19 @@ await context.TestEntities
138139 public void CreateExecuteUpdateSetter_ReturnsCorrectType ( )
139140 {
140141 // Test the compatibility helper method
141- if ( EFCoreCompatibilityHelper . IsEFCore10OrGreater )
142+ if ( CompatHelper . IsEFCore10OrGreater )
142143 {
143144 // For EF Core 10+, should return Action<T>
144145 Action < TestEntity > action = e => e . Name = "test" ;
145- var result = EFCoreCompatibilityHelper . CreateExecuteUpdateSetter < TestEntity > ( setterAction : action ) ;
146+ var result = CompatHelper . CreateExecuteUpdateSetter < TestEntity > ( setterAction : action ) ;
146147 Assert . IsType < Action < TestEntity > > ( result ) ;
147148 }
148149 else
149150 {
150151 // For EF Core 9-, should return Expression<Func<T, T>>
151152 System . Linq . Expressions . Expression < Func < TestEntity , TestEntity > > expression =
152153 e => new TestEntity { Name = "test" } ;
153- var result = EFCoreCompatibilityHelper . CreateExecuteUpdateSetter < TestEntity > ( setterExpression : expression ) ;
154+ var result = CompatHelper . CreateExecuteUpdateSetter < TestEntity > ( setterExpression : expression ) ;
154155 Assert . IsType < System . Linq . Expressions . Expression < Func < TestEntity , TestEntity > > > ( result ) ;
155156 }
156157 }
0 commit comments