File tree Expand file tree Collapse file tree 3 files changed +46
-27
lines changed Expand file tree Collapse file tree 3 files changed +46
-27
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Data ;
3
- using System . Data . Common ;
4
3
using Dapper ;
5
4
using MySql . Data . MySqlClient ;
6
5
using Xunit ;
@@ -242,17 +241,6 @@ public void CloneWithCopiesExistingPassword()
242
241
connection2 . Open ( ) ;
243
242
Assert . Equal ( ConnectionState . Open , connection2 . State ) ;
244
243
}
245
- #endif
246
- #if ! NETCOREAPP1_1_2
247
- [ Fact ]
248
- public void GetDataSourceInformationSchemaCollection ( )
249
- {
250
- using var connection = new MySqlConnection ( AppConfig . ConnectionString ) ;
251
- connection . Open ( ) ;
252
-
253
- var dataTable = connection . GetSchema ( DbMetaDataCollectionNames . DataSourceInformation ) ;
254
- Assert . Equal ( connection . ServerVersion , dataTable . Rows [ 0 ] [ "DataSourceProductVersion" ] ) ;
255
- }
256
244
#endif
257
245
}
258
246
}
Original file line number Diff line number Diff line change @@ -1032,21 +1032,6 @@ public void HasRowsRepeated()
1032
1032
Assert . True ( reader . HasRows ) ;
1033
1033
}
1034
1034
1035
- #if ! NETCOREAPP1_1_2
1036
- [ Fact ]
1037
- public void ReservedWordsSchema ( )
1038
- {
1039
- var table = m_database . Connection . GetSchema ( "ReservedWords" ) ;
1040
- Assert . NotNull ( table ) ;
1041
- Assert . Single ( table . Columns ) ;
1042
- Assert . Equal ( "ReservedWord" , table . Columns [ 0 ] . ColumnName ) ;
1043
- #if ! BASELINE
1044
- // https://bugs.mysql.com/bug.php?id=89639
1045
- Assert . Contains ( "CREATE" , table . Rows . Cast < DataRow > ( ) . Select ( x => ( string ) x [ 0 ] ) ) ;
1046
- #endif
1047
- }
1048
- #endif
1049
-
1050
1035
[ Fact ]
1051
1036
public void CommandBehaviorCloseConnection ( )
1052
1037
{
Original file line number Diff line number Diff line change
1
+ #if ! NETCOREAPP1_1_2
2
+ using System ;
3
+ using System . Data ;
4
+ using System . Data . Common ;
5
+ using System . Linq ;
6
+ using Xunit ;
7
+
8
+ namespace SideBySide
9
+ {
10
+ public class SchemaProviderTests : IClassFixture < DatabaseFixture > , IDisposable
11
+ {
12
+ public SchemaProviderTests ( DatabaseFixture database )
13
+ {
14
+ m_database = database ;
15
+ m_database . Connection . Open ( ) ;
16
+ }
17
+
18
+ public void Dispose ( )
19
+ {
20
+ m_database . Connection . Close ( ) ;
21
+ }
22
+
23
+ [ Fact ]
24
+ public void GetDataSourceInformationSchemaCollection ( )
25
+ {
26
+ var dataTable = m_database . Connection . GetSchema ( DbMetaDataCollectionNames . DataSourceInformation ) ;
27
+ Assert . Equal ( m_database . Connection . ServerVersion , dataTable . Rows [ 0 ] [ "DataSourceProductVersion" ] ) ;
28
+ }
29
+
30
+ [ Fact ]
31
+ public void ReservedWordsSchema ( )
32
+ {
33
+ var table = m_database . Connection . GetSchema ( "ReservedWords" ) ;
34
+ Assert . NotNull ( table ) ;
35
+ Assert . Single ( table . Columns ) ;
36
+ Assert . Equal ( "ReservedWord" , table . Columns [ 0 ] . ColumnName ) ;
37
+ #if ! BASELINE
38
+ // https://bugs.mysql.com/bug.php?id=89639
39
+ Assert . Contains ( "CREATE" , table . Rows . Cast < DataRow > ( ) . Select ( x => ( string ) x [ 0 ] ) ) ;
40
+ #endif
41
+ }
42
+
43
+ readonly DatabaseFixture m_database ;
44
+ }
45
+ }
46
+ #endif
You can’t perform that action at this time.
0 commit comments