55using System . Linq ;
66using System . Threading . Tasks ;
77using Microsoft . EntityFrameworkCore ;
8+ using Pomelo . EntityFrameworkCore . MySql . Infrastructure . Internal ;
89using Xunit ;
9- using CompatHelper = Pomelo . EntityFrameworkCore . MySql . Json . Microsoft . Infrastructure . Internal . EFCoreCompatibilityHelper ;
1010
1111namespace Pomelo . EntityFrameworkCore . MySql . FunctionalTests
1212{
@@ -27,7 +27,7 @@ public EFCoreCompatibilityTests(CompatibilityTestFixture fixture)
2727 public void EFCoreVersion_IsDetected ( )
2828 {
2929 // Verify that version detection works
30- var version = CompatHelper . EFCoreVersion ;
30+ var version = EFCoreCompatibilityHelper . EFCoreVersion ;
3131 Assert . NotNull ( version ) ;
3232 Assert . True ( version . Major >= 8 , "Should be using EF Core 8 or greater" ) ;
3333 }
@@ -36,19 +36,19 @@ public void EFCoreVersion_IsDetected()
3636 public void VersionFlags_AreSetCorrectly ( )
3737 {
3838 // Test version detection flags
39- var isEFCore8OrGreater = CompatHelper . IsEFCore8OrGreater ;
40- var isEFCore9OrGreater = CompatHelper . IsEFCore9OrGreater ;
41- var isEFCore10OrGreater = CompatHelper . IsEFCore10OrGreater ;
39+ var isEFCore8OrGreater = EFCoreCompatibilityHelper . IsEFCore8OrGreater ;
40+ var isEFCore9OrGreater = EFCoreCompatibilityHelper . IsEFCore9OrGreater ;
41+ var isEFCore10OrGreater = EFCoreCompatibilityHelper . IsEFCore10OrGreater ;
4242
4343 Assert . True ( isEFCore8OrGreater , "Should support EF Core 8+" ) ;
4444
4545 // These will be true based on the actual EF Core version being used
46- if ( CompatHelper . EFCoreVersion . Major >= 9 )
46+ if ( EFCoreCompatibilityHelper . EFCoreVersion . Major >= 9 )
4747 {
4848 Assert . True ( isEFCore9OrGreater ) ;
4949 }
5050
51- if ( CompatHelper . EFCoreVersion . Major >= 10 )
51+ if ( EFCoreCompatibilityHelper . EFCoreVersion . Major >= 10 )
5252 {
5353 Assert . True ( isEFCore10OrGreater ) ;
5454 }
@@ -138,19 +138,19 @@ await context.TestEntities
138138 public void CreateExecuteUpdateSetter_ReturnsCorrectType ( )
139139 {
140140 // Test the compatibility helper method
141- if ( CompatHelper . IsEFCore10OrGreater )
141+ if ( EFCoreCompatibilityHelper . IsEFCore10OrGreater )
142142 {
143143 // For EF Core 10+, should return Action<T>
144144 Action < TestEntity > action = e => e . Name = "test" ;
145- var result = CompatHelper . CreateExecuteUpdateSetter < TestEntity > ( setterAction : action ) ;
145+ var result = EFCoreCompatibilityHelper . CreateExecuteUpdateSetter < TestEntity > ( setterAction : action ) ;
146146 Assert . IsType < Action < TestEntity > > ( result ) ;
147147 }
148148 else
149149 {
150150 // For EF Core 9-, should return Expression<Func<T, T>>
151151 System . Linq . Expressions . Expression < Func < TestEntity , TestEntity > > expression =
152152 e => new TestEntity { Name = "test" } ;
153- var result = CompatHelper . CreateExecuteUpdateSetter < TestEntity > ( setterExpression : expression ) ;
153+ var result = EFCoreCompatibilityHelper . CreateExecuteUpdateSetter < TestEntity > ( setterExpression : expression ) ;
154154 Assert . IsType < System . Linq . Expressions . Expression < Func < TestEntity , TestEntity > > > ( result ) ;
155155 }
156156 }
0 commit comments