File tree Expand file tree Collapse file tree 6 files changed +20
-10
lines changed
Expand file tree Collapse file tree 6 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 1010
1111using System . Linq ;
1212using NHibernate . Cfg ;
13+ using NHibernate . Driver ;
1314using NHibernate . Hql . Ast . ANTLR ;
15+ using NHibernate . Util ;
1416using NUnit . Framework ;
1517
1618namespace NHibernate . Test . Hql . Ast
@@ -22,7 +24,8 @@ public class LimitClauseFixtureAsync : BaseFixture
2224 protected override bool AppliesTo ( Dialect . Dialect dialect )
2325 {
2426 return dialect . SupportsVariableLimit
25- && ! ( Dialect is Dialect . MsSql2000Dialect && cfg . Properties [ Environment . ConnectionDriver ] == typeof ( Driver . OdbcDriver ) . FullName ) ; // don't know why, but these tests don't work on SQL Server using ODBC
27+ && ! ( Dialect is Dialect . MsSql2000Dialect && // don't know why, but these tests don't work on SQL Server using ODBC
28+ typeof ( OdbcDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) ) ;
2629 }
2730
2831 protected override void OnSetUp ( )
@@ -186,4 +189,4 @@ public async Task TakeWithParameterAsync()
186189 s . Close ( ) ;
187190 }
188191 }
189- }
192+ }
Original file line number Diff line number Diff line change 1212using NHibernate . AdoNet ;
1313using NHibernate . Cfg ;
1414using NHibernate . Driver ;
15+ using NHibernate . Util ;
1516using NUnit . Framework ;
1617
1718namespace NHibernate . Test . NHSpecificTest . NH1144
@@ -36,7 +37,7 @@ protected override void Configure(Configuration configuration)
3637 [ Test ]
3738 public async Task CanSaveInSingleBatchAsync ( )
3839 {
39- if ( configuration . Properties [ Environment . ConnectionDriver ] . Contains ( typeof ( OracleDataClientDriver ) . Name ) == false )
40+ if ( ! typeof ( OracleDataClientDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) )
4041 {
4142 Assert . Ignore ( "Only applicable for Oracle Data Client driver" ) ;
4243 }
@@ -85,4 +86,4 @@ public async Task CanSaveInSingleBatchAsync()
8586 Assert . IsTrue ( executedBatch ) ;
8687 }
8788 }
88- }
89+ }
Original file line number Diff line number Diff line change 1313using NHibernate . Cfg ;
1414using NHibernate . Dialect ;
1515using NHibernate . Driver ;
16+ using NHibernate . Util ;
1617using NUnit . Framework ;
1718
1819namespace NHibernate . Test . NHSpecificTest . NH3202
@@ -26,7 +27,7 @@ protected override void Configure(Configuration configuration)
2627 if ( ! ( Dialect is MsSql2008Dialect ) )
2728 Assert . Ignore ( "Test is for MS SQL Server dialect only (custom dialect)." ) ;
2829
29- if ( ! Environment . ConnectionDriver . Contains ( "SqlClientDriver" ) )
30+ if ( ! typeof ( SqlClientDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) )
3031 Assert . Ignore ( "Test is for MS SQL Server driver only (custom driver is used)." ) ;
3132
3233 cfg . SetProperty ( Environment . Dialect , typeof ( OffsetStartsAtOneTestDialect ) . AssemblyQualifiedName ) ;
Original file line number Diff line number Diff line change 11using System . Linq ;
22using NHibernate . Cfg ;
3+ using NHibernate . Driver ;
34using NHibernate . Hql . Ast . ANTLR ;
5+ using NHibernate . Util ;
46using NUnit . Framework ;
57
68namespace NHibernate . Test . Hql . Ast
@@ -11,7 +13,8 @@ public class LimitClauseFixture : BaseFixture
1113 protected override bool AppliesTo ( Dialect . Dialect dialect )
1214 {
1315 return dialect . SupportsVariableLimit
14- && ! ( Dialect is Dialect . MsSql2000Dialect && cfg . Properties [ Environment . ConnectionDriver ] == typeof ( Driver . OdbcDriver ) . FullName ) ; // don't know why, but these tests don't work on SQL Server using ODBC
16+ && ! ( Dialect is Dialect . MsSql2000Dialect && // don't know why, but these tests don't work on SQL Server using ODBC
17+ typeof ( OdbcDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) ) ;
1518 }
1619
1720 protected override void OnSetUp ( )
@@ -175,4 +178,4 @@ public void TakeWithParameter()
175178 s . Close ( ) ;
176179 }
177180 }
178- }
181+ }
Original file line number Diff line number Diff line change 22using NHibernate . AdoNet ;
33using NHibernate . Cfg ;
44using NHibernate . Driver ;
5+ using NHibernate . Util ;
56using NUnit . Framework ;
67
78namespace NHibernate . Test . NHSpecificTest . NH1144
@@ -25,7 +26,7 @@ protected override void Configure(Configuration configuration)
2526 [ Test ]
2627 public void CanSaveInSingleBatch ( )
2728 {
28- if ( configuration . Properties [ Environment . ConnectionDriver ] . Contains ( typeof ( OracleDataClientDriver ) . Name ) == false )
29+ if ( ! typeof ( OracleDataClientDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) )
2930 {
3031 Assert . Ignore ( "Only applicable for Oracle Data Client driver" ) ;
3132 }
@@ -74,4 +75,4 @@ public void CanSaveInSingleBatch()
7475 Assert . IsTrue ( executedBatch ) ;
7576 }
7677 }
77- }
78+ }
Original file line number Diff line number Diff line change 33using NHibernate . Cfg ;
44using NHibernate . Dialect ;
55using NHibernate . Driver ;
6+ using NHibernate . Util ;
67using NUnit . Framework ;
78
89namespace NHibernate . Test . NHSpecificTest . NH3202
@@ -15,7 +16,7 @@ protected override void Configure(Configuration configuration)
1516 if ( ! ( Dialect is MsSql2008Dialect ) )
1617 Assert . Ignore ( "Test is for MS SQL Server dialect only (custom dialect)." ) ;
1718
18- if ( ! Environment . ConnectionDriver . Contains ( "SqlClientDriver" ) )
19+ if ( ! typeof ( SqlClientDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) )
1920 Assert . Ignore ( "Test is for MS SQL Server driver only (custom driver is used)." ) ;
2021
2122 cfg . SetProperty ( Environment . Dialect , typeof ( OffsetStartsAtOneTestDialect ) . AssemblyQualifiedName ) ;
You can’t perform that action at this time.
0 commit comments