@@ -11,7 +11,7 @@ public GetValueConversionTests(SelectValueFixture fixture)
11
11
{
12
12
}
13
13
14
- // GetBoolean allows conversions from any integral type for backwards compatibility
14
+ // GetBoolean allows conversions from any integral type and decimal for backwards compatibility
15
15
public override void GetBoolean_throws_for_maximum_Byte ( ) => TestGetValue ( DbType . Byte , ValueKind . Maximum , x => x . GetBoolean ( 0 ) , true ) ;
16
16
public override void GetBoolean_throws_for_maximum_Int16 ( ) => TestGetValue ( DbType . Int16 , ValueKind . Maximum , x => x . GetBoolean ( 0 ) , true ) ;
17
17
public override void GetBoolean_throws_for_maximum_Int32 ( ) => TestGetValue ( DbType . Int32 , ValueKind . Maximum , x => x . GetBoolean ( 0 ) , true ) ;
@@ -20,6 +20,7 @@ public GetValueConversionTests(SelectValueFixture fixture)
20
20
public override void GetBoolean_throws_for_maximum_UInt16 ( ) => TestGetValue ( DbType . UInt16 , ValueKind . Maximum , x => x . GetBoolean ( 0 ) , true ) ;
21
21
public override void GetBoolean_throws_for_maximum_UInt32 ( ) => TestGetValue ( DbType . UInt32 , ValueKind . Maximum , x => x . GetBoolean ( 0 ) , true ) ;
22
22
public override void GetBoolean_throws_for_maximum_UInt64 ( ) => TestGetValue ( DbType . UInt64 , ValueKind . Maximum , x => x . GetBoolean ( 0 ) , true ) ;
23
+ public override void GetBoolean_throws_for_maximum_Decimal ( ) => TestGetValue ( DbType . Decimal , ValueKind . Maximum , x => x . GetBoolean ( 0 ) , true ) ;
23
24
public override void GetBoolean_throws_for_minimum_Byte ( ) => TestGetValue ( DbType . Byte , ValueKind . Minimum , x => x . GetBoolean ( 0 ) , false ) ;
24
25
public override void GetBoolean_throws_for_minimum_Int16 ( ) => TestGetValue ( DbType . Int16 , ValueKind . Minimum , x => x . GetBoolean ( 0 ) , true ) ;
25
26
public override void GetBoolean_throws_for_minimum_Int32 ( ) => TestGetValue ( DbType . Int32 , ValueKind . Minimum , x => x . GetBoolean ( 0 ) , true ) ;
@@ -28,6 +29,7 @@ public GetValueConversionTests(SelectValueFixture fixture)
28
29
public override void GetBoolean_throws_for_minimum_UInt16 ( ) => TestGetValue ( DbType . UInt16 , ValueKind . Minimum , x => x . GetBoolean ( 0 ) , false ) ;
29
30
public override void GetBoolean_throws_for_minimum_UInt32 ( ) => TestGetValue ( DbType . UInt32 , ValueKind . Minimum , x => x . GetBoolean ( 0 ) , false ) ;
30
31
public override void GetBoolean_throws_for_minimum_UInt64 ( ) => TestGetValue ( DbType . UInt64 , ValueKind . Minimum , x => x . GetBoolean ( 0 ) , false ) ;
32
+ public override void GetBoolean_throws_for_minimum_Decimal ( ) => TestGetValue ( DbType . Decimal , ValueKind . Minimum , x => x . GetBoolean ( 0 ) , false ) ;
31
33
public override void GetBoolean_throws_for_one_Byte ( ) => TestGetValue ( DbType . Byte , ValueKind . One , x => x . GetBoolean ( 0 ) , true ) ;
32
34
public override void GetBoolean_throws_for_one_Int16 ( ) => TestGetValue ( DbType . Int16 , ValueKind . One , x => x . GetBoolean ( 0 ) , true ) ;
33
35
public override void GetBoolean_throws_for_one_Int32 ( ) => TestGetValue ( DbType . Int32 , ValueKind . One , x => x . GetBoolean ( 0 ) , true ) ;
@@ -36,6 +38,7 @@ public GetValueConversionTests(SelectValueFixture fixture)
36
38
public override void GetBoolean_throws_for_one_UInt16 ( ) => TestGetValue ( DbType . UInt16 , ValueKind . One , x => x . GetBoolean ( 0 ) , true ) ;
37
39
public override void GetBoolean_throws_for_one_UInt32 ( ) => TestGetValue ( DbType . UInt32 , ValueKind . One , x => x . GetBoolean ( 0 ) , true ) ;
38
40
public override void GetBoolean_throws_for_one_UInt64 ( ) => TestGetValue ( DbType . UInt64 , ValueKind . One , x => x . GetBoolean ( 0 ) , true ) ;
41
+ public override void GetBoolean_throws_for_one_Decimal ( ) => TestGetValue ( DbType . Decimal , ValueKind . One , x => x . GetBoolean ( 0 ) , true ) ;
39
42
public override void GetBoolean_throws_for_zero_Byte ( ) => TestGetValue ( DbType . Byte , ValueKind . Zero , x => x . GetBoolean ( 0 ) , false ) ;
40
43
public override void GetBoolean_throws_for_zero_Int16 ( ) => TestGetValue ( DbType . Int16 , ValueKind . Zero , x => x . GetBoolean ( 0 ) , false ) ;
41
44
public override void GetBoolean_throws_for_zero_Int32 ( ) => TestGetValue ( DbType . Int32 , ValueKind . Zero , x => x . GetBoolean ( 0 ) , false ) ;
@@ -44,6 +47,7 @@ public GetValueConversionTests(SelectValueFixture fixture)
44
47
public override void GetBoolean_throws_for_zero_UInt16 ( ) => TestGetValue ( DbType . UInt16 , ValueKind . Zero , x => x . GetBoolean ( 0 ) , false ) ;
45
48
public override void GetBoolean_throws_for_zero_UInt32 ( ) => TestGetValue ( DbType . UInt32 , ValueKind . Zero , x => x . GetBoolean ( 0 ) , false ) ;
46
49
public override void GetBoolean_throws_for_zero_UInt64 ( ) => TestGetValue ( DbType . UInt64 , ValueKind . Zero , x => x . GetBoolean ( 0 ) , false ) ;
50
+ public override void GetBoolean_throws_for_zero_Decimal ( ) => TestGetValue ( DbType . Decimal , ValueKind . Zero , x => x . GetBoolean ( 0 ) , false ) ;
47
51
48
52
// GetByte allows integral conversions
49
53
public override void GetByte_throws_for_maximum_Int16 ( ) => TestException ( DbType . Int16 , ValueKind . Maximum , x => x . GetByte ( 0 ) , typeof ( OverflowException ) ) ;
0 commit comments