@@ -7,49 +7,49 @@ namespace Belin.Sql;
77public sealed class MapperTests {
88
99 [ DataRow ( null , typeof ( bool ) , false , false ) ]
10- [ DataRow ( null , typeof ( bool ? ) , false , null ) ]
10+ [ DataRow ( null , typeof ( bool ? ) , true , null ) ]
1111 [ DataRow ( 0 , typeof ( bool ) , false , false ) ]
12- [ DataRow ( 0 , typeof ( bool ? ) , false , false ) ]
12+ [ DataRow ( 0 , typeof ( bool ? ) , true , false ) ]
1313 [ DataRow ( 1 , typeof ( bool ) , false , true ) ]
14- [ DataRow ( 1 , typeof ( bool ? ) , false , true ) ]
14+ [ DataRow ( 1 , typeof ( bool ? ) , true , true ) ]
1515 [ DataRow ( "false" , typeof ( bool ) , false , false ) ]
1616 [ DataRow ( "true" , typeof ( bool ) , false , true ) ]
1717
1818 [ DataRow ( null , typeof ( char ) , false , char . MinValue ) ]
19- [ DataRow ( null , typeof ( char ? ) , false , null ) ]
19+ [ DataRow ( null , typeof ( char ? ) , true , null ) ]
2020 [ DataRow ( 0 , typeof ( char ) , false , char . MinValue ) ]
21- [ DataRow ( 0 , typeof ( char ? ) , false , char . MinValue ) ]
21+ [ DataRow ( 0 , typeof ( char ? ) , true , char . MinValue ) ]
2222 [ DataRow ( 97 , typeof ( char ) , false , 'a' ) ]
2323 [ DataRow ( "a" , typeof ( char ) , false , 'a' ) ]
2424
2525 [ DataRow ( null , typeof ( double ) , false , 0.0 ) ]
26- [ DataRow ( null , typeof ( double ? ) , false , null ) ]
26+ [ DataRow ( null , typeof ( double ? ) , true , null ) ]
2727 [ DataRow ( 0 , typeof ( double ) , false , 0.0 ) ]
28- [ DataRow ( 0 , typeof ( double ? ) , false , 0.0 ) ]
28+ [ DataRow ( 0 , typeof ( double ? ) , true , 0.0 ) ]
2929 [ DataRow ( 123 , typeof ( double ) , false , 123.0 ) ]
30- [ DataRow ( - 123.456 , typeof ( double ? ) , false , - 123.456 ) ]
30+ [ DataRow ( - 123.456 , typeof ( double ? ) , true , - 123.456 ) ]
3131 [ DataRow ( "123" , typeof ( double ) , false , 123.0 ) ]
3232 [ DataRow ( "-123.456" , typeof ( double ) , false , - 123.456 ) ]
3333
3434 [ DataRow ( null , typeof ( int ) , false , 0 ) ]
35- [ DataRow ( null , typeof ( int ? ) , false , null ) ]
35+ [ DataRow ( null , typeof ( int ? ) , true , null ) ]
3636 [ DataRow ( 0 , typeof ( int ) , false , 0 ) ]
37- [ DataRow ( 0 , typeof ( int ? ) , false , 0 ) ]
37+ [ DataRow ( 0 , typeof ( int ? ) , true , 0 ) ]
3838 [ DataRow ( 123 , typeof ( int ) , false , 123 ) ]
39- [ DataRow ( - 123.456 , typeof ( int ? ) , false , - 123 ) ]
39+ [ DataRow ( - 123.456 , typeof ( int ? ) , true , - 123 ) ]
4040 [ DataRow ( "123" , typeof ( int ) , false , 123 ) ]
4141 [ DataRow ( "-123" , typeof ( int ) , false , - 123 ) ]
4242
4343 [ DataRow ( null , typeof ( DayOfWeek ) , false , DayOfWeek . Sunday ) ]
44- [ DataRow ( null , typeof ( DayOfWeek ? ) , false , null ) ]
44+ [ DataRow ( null , typeof ( DayOfWeek ? ) , true , null ) ]
4545 [ DataRow ( 0 , typeof ( DayOfWeek ) , false , DayOfWeek . Sunday ) ]
46- [ DataRow ( 0 , typeof ( DayOfWeek ? ) , false , DayOfWeek . Sunday ) ]
46+ [ DataRow ( 0 , typeof ( DayOfWeek ? ) , true , DayOfWeek . Sunday ) ]
4747 [ DataRow ( 5 , typeof ( DayOfWeek ) , false , DayOfWeek . Friday ) ]
48- [ DataRow ( 5 , typeof ( DayOfWeek ? ) , false , DayOfWeek . Friday ) ]
48+ [ DataRow ( 5 , typeof ( DayOfWeek ? ) , true , DayOfWeek . Friday ) ]
4949 [ DataRow ( "sunday" , typeof ( DayOfWeek ) , false , DayOfWeek . Sunday ) ]
5050 [ DataRow ( "friday" , typeof ( DayOfWeek ) , false , DayOfWeek . Friday ) ]
5151
5252 [ TestMethod ]
53- public void ChangeType ( object ? value , Type conversionType , bool isNullableReferenceType , object ? expected ) =>
54- AreEqual ( expected , new Mapper ( ) . ChangeType ( value , conversionType , isNullableReferenceType ) ) ;
53+ public void ChangeType ( object ? value , Type conversionType , bool isNullable , object ? expected ) =>
54+ AreEqual ( expected , new Mapper ( ) . ChangeType ( value , conversionType , isNullable ) ) ;
5555}
0 commit comments