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 10
10
11
11
using System . Linq ;
12
12
using NHibernate . Cfg ;
13
+ using NHibernate . Driver ;
13
14
using NHibernate . Hql . Ast . ANTLR ;
15
+ using NHibernate . Util ;
14
16
using NUnit . Framework ;
15
17
16
18
namespace NHibernate . Test . Hql . Ast
@@ -22,7 +24,8 @@ public class LimitClauseFixtureAsync : BaseFixture
22
24
protected override bool AppliesTo ( Dialect . Dialect dialect )
23
25
{
24
26
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 ) ) ) ) ;
26
29
}
27
30
28
31
protected override void OnSetUp ( )
@@ -186,4 +189,4 @@ public async Task TakeWithParameterAsync()
186
189
s . Close ( ) ;
187
190
}
188
191
}
189
- }
192
+ }
Original file line number Diff line number Diff line change 12
12
using NHibernate . AdoNet ;
13
13
using NHibernate . Cfg ;
14
14
using NHibernate . Driver ;
15
+ using NHibernate . Util ;
15
16
using NUnit . Framework ;
16
17
17
18
namespace NHibernate . Test . NHSpecificTest . NH1144
@@ -36,7 +37,7 @@ protected override void Configure(Configuration configuration)
36
37
[ Test ]
37
38
public async Task CanSaveInSingleBatchAsync ( )
38
39
{
39
- if ( configuration . Properties [ Environment . ConnectionDriver ] . Contains ( typeof ( OracleDataClientDriver ) . Name ) == false )
40
+ if ( ! typeof ( OracleDataClientDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) )
40
41
{
41
42
Assert . Ignore ( "Only applicable for Oracle Data Client driver" ) ;
42
43
}
@@ -85,4 +86,4 @@ public async Task CanSaveInSingleBatchAsync()
85
86
Assert . IsTrue ( executedBatch ) ;
86
87
}
87
88
}
88
- }
89
+ }
Original file line number Diff line number Diff line change 13
13
using NHibernate . Cfg ;
14
14
using NHibernate . Dialect ;
15
15
using NHibernate . Driver ;
16
+ using NHibernate . Util ;
16
17
using NUnit . Framework ;
17
18
18
19
namespace NHibernate . Test . NHSpecificTest . NH3202
@@ -26,7 +27,7 @@ protected override void Configure(Configuration configuration)
26
27
if ( ! ( Dialect is MsSql2008Dialect ) )
27
28
Assert . Ignore ( "Test is for MS SQL Server dialect only (custom dialect)." ) ;
28
29
29
- if ( ! Environment . ConnectionDriver . Contains ( "SqlClientDriver" ) )
30
+ if ( ! typeof ( SqlClientDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) )
30
31
Assert . Ignore ( "Test is for MS SQL Server driver only (custom driver is used)." ) ;
31
32
32
33
cfg . SetProperty ( Environment . Dialect , typeof ( OffsetStartsAtOneTestDialect ) . AssemblyQualifiedName ) ;
Original file line number Diff line number Diff line change 1
1
using System . Linq ;
2
2
using NHibernate . Cfg ;
3
+ using NHibernate . Driver ;
3
4
using NHibernate . Hql . Ast . ANTLR ;
5
+ using NHibernate . Util ;
4
6
using NUnit . Framework ;
5
7
6
8
namespace NHibernate . Test . Hql . Ast
@@ -11,7 +13,8 @@ public class LimitClauseFixture : BaseFixture
11
13
protected override bool AppliesTo ( Dialect . Dialect dialect )
12
14
{
13
15
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 ) ) ) ) ;
15
18
}
16
19
17
20
protected override void OnSetUp ( )
@@ -175,4 +178,4 @@ public void TakeWithParameter()
175
178
s . Close ( ) ;
176
179
}
177
180
}
178
- }
181
+ }
Original file line number Diff line number Diff line change 2
2
using NHibernate . AdoNet ;
3
3
using NHibernate . Cfg ;
4
4
using NHibernate . Driver ;
5
+ using NHibernate . Util ;
5
6
using NUnit . Framework ;
6
7
7
8
namespace NHibernate . Test . NHSpecificTest . NH1144
@@ -25,7 +26,7 @@ protected override void Configure(Configuration configuration)
25
26
[ Test ]
26
27
public void CanSaveInSingleBatch ( )
27
28
{
28
- if ( configuration . Properties [ Environment . ConnectionDriver ] . Contains ( typeof ( OracleDataClientDriver ) . Name ) == false )
29
+ if ( ! typeof ( OracleDataClientDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) )
29
30
{
30
31
Assert . Ignore ( "Only applicable for Oracle Data Client driver" ) ;
31
32
}
@@ -74,4 +75,4 @@ public void CanSaveInSingleBatch()
74
75
Assert . IsTrue ( executedBatch ) ;
75
76
}
76
77
}
77
- }
78
+ }
Original file line number Diff line number Diff line change 3
3
using NHibernate . Cfg ;
4
4
using NHibernate . Dialect ;
5
5
using NHibernate . Driver ;
6
+ using NHibernate . Util ;
6
7
using NUnit . Framework ;
7
8
8
9
namespace NHibernate . Test . NHSpecificTest . NH3202
@@ -15,7 +16,7 @@ protected override void Configure(Configuration configuration)
15
16
if ( ! ( Dialect is MsSql2008Dialect ) )
16
17
Assert . Ignore ( "Test is for MS SQL Server dialect only (custom dialect)." ) ;
17
18
18
- if ( ! Environment . ConnectionDriver . Contains ( "SqlClientDriver" ) )
19
+ if ( ! typeof ( SqlClientDriver ) . IsAssignableFrom ( ReflectHelper . ClassForName ( cfg . GetProperty ( Environment . ConnectionDriver ) ) ) )
19
20
Assert . Ignore ( "Test is for MS SQL Server driver only (custom driver is used)." ) ;
20
21
21
22
cfg . SetProperty ( Environment . Dialect , typeof ( OffsetStartsAtOneTestDialect ) . AssemblyQualifiedName ) ;
You can’t perform that action at this time.
0 commit comments