@@ -212,8 +212,8 @@ public void QueryBoolean(string column, string dataTypeName, object[] expected)
212
212
}
213
213
214
214
[ Theory ]
215
- [ InlineData ( "TinyInt1" , "TINYINT" , new object [ ] { null , ( sbyte ) 0 , ( sbyte ) 1 , ( sbyte ) 0 , ( sbyte ) 1 , ( sbyte ) - 1 , ( sbyte ) 123 } ) ]
216
- [ InlineData ( "Boolean" , "TINYINT" , new object [ ] { null , ( sbyte ) 0 , ( sbyte ) 1 , ( sbyte ) 0 , ( sbyte ) 1 , ( sbyte ) - 1 , ( sbyte ) 123 } ) ]
215
+ [ InlineData ( "TinyInt1" , "TINYINT" , new object [ ] { null , ( sbyte ) 0 , ( sbyte ) 1 , ( sbyte ) 0 , ( sbyte ) 1 , ( sbyte ) - 1 , ( sbyte ) 123 } ) ]
216
+ [ InlineData ( "Boolean" , "TINYINT" , new object [ ] { null , ( sbyte ) 0 , ( sbyte ) 1 , ( sbyte ) 0 , ( sbyte ) 1 , ( sbyte ) - 1 , ( sbyte ) 123 } ) ]
217
217
public void QueryTinyIntSbyte ( string column , string dataTypeName , object [ ] expected )
218
218
{
219
219
var csb = AppConfig . CreateConnectionStringBuilder ( ) ;
@@ -288,9 +288,9 @@ public void QueryUInt64(string column, string dataTypeName, object[] expected)
288
288
}
289
289
290
290
[ Theory ]
291
- [ InlineData ( "Bit1" , new object [ ] { null , 0UL , 1UL , 1UL } ) ]
292
- [ InlineData ( "Bit32" , new object [ ] { null , 0UL , 1UL , ( ulong ) uint . MaxValue } ) ]
293
- [ InlineData ( "Bit64" , new object [ ] { null , 0UL , 1UL , ulong . MaxValue } ) ]
291
+ [ InlineData ( "Bit1" , new object [ ] { null , 0UL , 1UL , 1UL } ) ]
292
+ [ InlineData ( "Bit32" , new object [ ] { null , 0UL , 1UL , ( ulong ) uint . MaxValue } ) ]
293
+ [ InlineData ( "Bit64" , new object [ ] { null , 0UL , 1UL , ulong . MaxValue } ) ]
294
294
public void QueryBits ( string column , object [ ] expected )
295
295
{
296
296
DoQuery ( "bits" , column , "BIT" , expected , reader => reader . GetUInt64 ( column ) ) ;
@@ -348,7 +348,7 @@ public void QueryGuid(string column, string dataTypeName, object[] expected)
348
348
}
349
349
350
350
[ Theory ]
351
- [ InlineData ( "utf8" , new [ ] { null , "" , "ASCII" , "Ũńıċōđĕ" , c_251ByteString } ) ]
351
+ [ InlineData ( "utf8" , new [ ] { null , "" , "ASCII" , "Ũńıċōđĕ" , c_251ByteString } ) ]
352
352
[ InlineData ( "cp1251" , new [ ] { null , "" , "ASCII" , "АБВГабвг" , c_251ByteString } ) ]
353
353
public void QueryChar ( string column , string [ ] expected )
354
354
{
@@ -443,7 +443,7 @@ public async Task QueryWithGuidParameter(bool oldGuids)
443
443
using ( var connection = new MySqlConnection ( csb . ConnectionString ) )
444
444
{
445
445
await connection . OpenAsync ( ) . ConfigureAwait ( false ) ;
446
- Assert . Equal ( oldGuids ? 0L : 1L , ( await connection . QueryAsync < long > ( @"select count(*) from datatypes_strings where guid = @guid" , new { guid = new Guid ( "fd24a0e8-c3f2-4821-a456-35da2dc4bb8f" ) } ) . ConfigureAwait ( false ) ) . SingleOrDefault ( ) ) ;
446
+ Assert . Equal ( oldGuids ? 0L : 1L , ( await connection . QueryAsync < long > ( @"select count(*) from datatypes_strings where guid = @guid" , new { guid = new Guid ( "fd24a0e8-c3f2-4821-a456-35da2dc4bb8f" ) } ) . ConfigureAwait ( false ) ) . SingleOrDefault ( ) ) ;
447
447
Assert . Equal ( oldGuids ? 0L : 1L , ( await connection . QueryAsync < long > ( @"select count(*) from datatypes_strings where guidbin = @guid" , new { guid = new Guid ( "fd24a0e8-c3f2-4821-a456-35da2dc4bb8f" ) } ) . ConfigureAwait ( false ) ) . SingleOrDefault ( ) ) ;
448
448
Assert . Equal ( oldGuids ? 1L : 0L , ( await connection . QueryAsync < long > ( @"select count(*) from datatypes_blobs where guidbin = @guid" , new { guid = new Guid ( 0x33221100 , 0x5544 , 0x7766 , 0x88 , 0x99 , 0xAA , 0xBB , 0xCC , 0xDD , 0xEE , 0xFF ) } ) . ConfigureAwait ( false ) ) . SingleOrDefault ( ) ) ;
449
449
}
@@ -927,7 +927,7 @@ private static byte[] CreateByteArray(int size)
927
927
}
928
928
929
929
[ SkippableTheory ( ServerFeatures . Json ) ]
930
- [ InlineData ( new object [ ] { new [ ] { null , "NULL" , "BOOLEAN" , "ARRAY" , "ARRAY" , "ARRAY" , "INTEGER" , "INTEGER" , "OBJECT" , "OBJECT" } } ) ]
930
+ [ InlineData ( new object [ ] { new [ ] { null , "NULL" , "BOOLEAN" , "ARRAY" , "ARRAY" , "ARRAY" , "INTEGER" , "INTEGER" , "OBJECT" , "OBJECT" } } ) ]
931
931
public void JsonType ( string [ ] expectedTypes )
932
932
{
933
933
var types = m_database . Connection . Query < string > ( @"select JSON_TYPE(value) from datatypes_json_core order by rowid;" ) . ToList ( ) ;
@@ -963,7 +963,7 @@ private void DoQuery(
963
963
object baselineCoercedNullValue = null ,
964
964
bool omitWhereTest = false ,
965
965
bool matchesDefaultType = true ,
966
- MySqlConnection connection = null )
966
+ MySqlConnection connection = null )
967
967
{
968
968
DoQuery < GetValueWhenNullException > ( table , column , dataTypeName , expected , getValue , baselineCoercedNullValue , omitWhereTest , matchesDefaultType , connection ) ;
969
969
}
@@ -979,7 +979,7 @@ private void DoQuery<TException>(
979
979
object baselineCoercedNullValue = null ,
980
980
bool omitWhereTest = false ,
981
981
bool matchesDefaultType = true ,
982
- MySqlConnection connection = null )
982
+ MySqlConnection connection = null )
983
983
where TException : Exception
984
984
{
985
985
connection = connection ?? m_database . Connection ;
@@ -1020,19 +1020,19 @@ private void DoQuery<TException>(
1020
1020
var syncMethod = typeof ( MySqlDataReader )
1021
1021
. GetMethod ( "GetFieldValue" )
1022
1022
. MakeGenericMethod ( value . GetType ( ) ) ;
1023
- Assert . Equal ( value , syncMethod . Invoke ( reader , new object [ ] { 0 } ) ) ;
1023
+ Assert . Equal ( value , syncMethod . Invoke ( reader , new object [ ] { 0 } ) ) ;
1024
1024
1025
1025
// test `reader.GetFieldValueAsync<value.GetType()>`
1026
1026
var asyncMethod = typeof ( MySqlDataReader )
1027
- . GetMethod ( "GetFieldValueAsync" , new [ ] { typeof ( int ) } )
1027
+ . GetMethod ( "GetFieldValueAsync" , new [ ] { typeof ( int ) } )
1028
1028
. MakeGenericMethod ( value . GetType ( ) ) ;
1029
- var asyncMethodValue = asyncMethod . Invoke ( reader , new object [ ] { 0 } ) ;
1029
+ var asyncMethodValue = asyncMethod . Invoke ( reader , new object [ ] { 0 } ) ;
1030
1030
var asyncMethodGetAwaiter = asyncMethodValue . GetType ( )
1031
1031
. GetMethod ( "GetAwaiter" ) ;
1032
- var asyncMethodGetAwaiterValue = asyncMethodGetAwaiter . Invoke ( asyncMethodValue , new object [ ] { } ) ;
1032
+ var asyncMethodGetAwaiterValue = asyncMethodGetAwaiter . Invoke ( asyncMethodValue , new object [ ] { } ) ;
1033
1033
var asyncMethodGetResult = asyncMethodGetAwaiterValue . GetType ( )
1034
1034
. GetMethod ( "GetResult" ) ;
1035
- var asyncMethodGetResultValue = asyncMethodGetResult . Invoke ( asyncMethodGetAwaiterValue , new object [ ] { } ) ;
1035
+ var asyncMethodGetResultValue = asyncMethodGetResult . Invoke ( asyncMethodGetAwaiterValue , new object [ ] { } ) ;
1036
1036
Assert . Equal ( value , asyncMethodGetResultValue ) ;
1037
1037
}
1038
1038
}
0 commit comments