@@ -86,7 +86,7 @@ public void Constructor2_ConnectionString_Invalid()
8686 // Keyword not supported: 'invalidkeyword'
8787 Assert . Null ( ex . InnerException ) ;
8888 Assert . NotNull ( ex . Message ) ;
89- Assert . True ( ex . Message . IndexOf ( "'invalidkeyword'" ) != - 1 ) ;
89+ Assert . True ( ex . Message . IndexOf ( "'invalidkeyword'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
9090 Assert . Null ( ex . ParamName ) ;
9191
9292 // invalid packet size (< minimum)
@@ -267,7 +267,7 @@ public void ConnectionString_Value_Invalid()
267267 // Keyword not supported: 'invalidkeyword'
268268 Assert . Null ( ex . InnerException ) ;
269269 Assert . NotNull ( ex . Message ) ;
270- Assert . True ( ex . Message . IndexOf ( "'invalidkeyword'" ) != - 1 ) ;
270+ Assert . True ( ex . Message . IndexOf ( "'invalidkeyword'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
271271 Assert . Null ( ex . ParamName ) ;
272272 }
273273
@@ -468,7 +468,7 @@ public void ConnectionString_ConnectTimeout_Invalid()
468468 // Invalid value for key 'connect timeout'
469469 Assert . Null ( ex . InnerException ) ;
470470 Assert . NotNull ( ex . Message ) ;
471- Assert . True ( ex . Message . IndexOf ( "'connect timeout'" ) != - 1 ) ;
471+ Assert . True ( ex . Message . IndexOf ( "'connect timeout'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
472472 Assert . Null ( ex . ParamName ) ;
473473
474474 // invalid number
@@ -477,7 +477,7 @@ public void ConnectionString_ConnectTimeout_Invalid()
477477 Assert . NotNull ( ex . InnerException ) ;
478478 Assert . Equal ( typeof ( FormatException ) , ex . InnerException . GetType ( ) ) ;
479479 Assert . NotNull ( ex . Message ) ;
480- Assert . True ( ex . Message . IndexOf ( "'connect timeout'" ) != - 13 ) ;
480+ Assert . True ( ex . Message . IndexOf ( "'connect timeout'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
481481 Assert . Null ( ex . ParamName ) ;
482482
483483 // Input string was not in a correct format
@@ -491,7 +491,7 @@ public void ConnectionString_ConnectTimeout_Invalid()
491491 Assert . NotNull ( ex . InnerException ) ;
492492 Assert . Equal ( typeof ( OverflowException ) , ex . InnerException . GetType ( ) ) ;
493493 Assert . NotNull ( ex . Message ) ;
494- Assert . True ( ex . Message . IndexOf ( "'connect timeout'" ) != - 1 ) ;
494+ Assert . True ( ex . Message . IndexOf ( "'connect timeout'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
495495 Assert . Null ( ex . ParamName ) ;
496496
497497 // Value was either too large or too small for an Int32
@@ -526,7 +526,7 @@ public void ConnectionString_CommandTimeout_Invalid()
526526 // Invalid value for key 'connect timeout'
527527 Assert . Null ( ex . InnerException ) ;
528528 Assert . NotNull ( ex . Message ) ;
529- Assert . True ( ex . Message . IndexOf ( "'command timeout'" ) != - 1 ) ;
529+ Assert . True ( ex . Message . IndexOf ( "'command timeout'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
530530 Assert . Null ( ex . ParamName ) ;
531531
532532 // invalid number
@@ -535,7 +535,7 @@ public void ConnectionString_CommandTimeout_Invalid()
535535 Assert . NotNull ( ex . InnerException ) ;
536536 Assert . Equal ( typeof ( FormatException ) , ex . InnerException . GetType ( ) ) ;
537537 Assert . NotNull ( ex . Message ) ;
538- Assert . True ( ex . Message . IndexOf ( "'command timeout'" ) != - 13 ) ;
538+ Assert . True ( ex . Message . IndexOf ( "'command timeout'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
539539 Assert . Null ( ex . ParamName ) ;
540540
541541 // Input string was not in a correct format
@@ -549,7 +549,7 @@ public void ConnectionString_CommandTimeout_Invalid()
549549 Assert . NotNull ( ex . InnerException ) ;
550550 Assert . Equal ( typeof ( OverflowException ) , ex . InnerException . GetType ( ) ) ;
551551 Assert . NotNull ( ex . Message ) ;
552- Assert . True ( ex . Message . IndexOf ( "'command timeout'" ) != - 1 ) ;
552+ Assert . True ( ex . Message . IndexOf ( "'command timeout'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
553553 Assert . Null ( ex . ParamName ) ;
554554
555555 // Value was either too large or too small for an Int32
@@ -634,7 +634,7 @@ public void ConnectionString_MaxPoolSize_Invalid()
634634 // Invalid value for key 'max pool size'
635635 Assert . Null ( ex . InnerException ) ;
636636 Assert . NotNull ( ex . Message ) ;
637- Assert . True ( ex . Message . IndexOf ( "'max pool size'" ) != - 1 ) ;
637+ Assert . True ( ex . Message . IndexOf ( "'max pool size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
638638 Assert . Null ( ex . ParamName ) ;
639639
640640 // invalid number
@@ -643,7 +643,7 @@ public void ConnectionString_MaxPoolSize_Invalid()
643643 Assert . NotNull ( ex . InnerException ) ;
644644 Assert . Equal ( typeof ( FormatException ) , ex . InnerException . GetType ( ) ) ;
645645 Assert . NotNull ( ex . Message ) ;
646- Assert . True ( ex . Message . IndexOf ( "'max pool size'" ) != - 1 ) ;
646+ Assert . True ( ex . Message . IndexOf ( "'max pool size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
647647 Assert . Null ( ex . ParamName ) ;
648648
649649 // Input string was not in a correct format
@@ -657,7 +657,7 @@ public void ConnectionString_MaxPoolSize_Invalid()
657657 Assert . NotNull ( ex . InnerException ) ;
658658 Assert . Equal ( typeof ( OverflowException ) , ex . InnerException . GetType ( ) ) ;
659659 Assert . NotNull ( ex . Message ) ;
660- Assert . True ( ex . Message . IndexOf ( "'max pool size'" ) != - 1 ) ;
660+ Assert . True ( ex . Message . IndexOf ( "'max pool size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
661661 Assert . Null ( ex . ParamName ) ;
662662
663663 // Value was either too large or too small for an Int32
@@ -670,7 +670,7 @@ public void ConnectionString_MaxPoolSize_Invalid()
670670 // Invalid value for key 'max pool size'
671671 Assert . Null ( ex . InnerException ) ;
672672 Assert . NotNull ( ex . Message ) ;
673- Assert . True ( ex . Message . IndexOf ( "'max pool size'" ) != - 1 ) ;
673+ Assert . True ( ex . Message . IndexOf ( "'max pool size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
674674 Assert . Null ( ex . ParamName ) ;
675675
676676 // less than min pool size
@@ -702,7 +702,7 @@ public void ConnectionString_MinPoolSize_Invalid()
702702 // Invalid value for key 'min pool size'
703703 Assert . Null ( ex . InnerException ) ;
704704 Assert . NotNull ( ex . Message ) ;
705- Assert . True ( ex . Message . IndexOf ( "'min pool size'" ) != - 1 ) ;
705+ Assert . True ( ex . Message . IndexOf ( "'min pool size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
706706 Assert . Null ( ex . ParamName ) ;
707707
708708 // invalid number
@@ -711,7 +711,7 @@ public void ConnectionString_MinPoolSize_Invalid()
711711 Assert . NotNull ( ex . InnerException ) ;
712712 Assert . Equal ( typeof ( FormatException ) , ex . InnerException . GetType ( ) ) ;
713713 Assert . NotNull ( ex . Message ) ;
714- Assert . True ( ex . Message . IndexOf ( "'min pool size'" ) != - 1 ) ;
714+ Assert . True ( ex . Message . IndexOf ( "'min pool size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
715715 Assert . Null ( ex . ParamName ) ;
716716
717717 // Input string was not in a correct format
@@ -725,7 +725,7 @@ public void ConnectionString_MinPoolSize_Invalid()
725725 Assert . NotNull ( ex . InnerException ) ;
726726 Assert . Equal ( typeof ( OverflowException ) , ex . InnerException . GetType ( ) ) ;
727727 Assert . NotNull ( ex . Message ) ;
728- Assert . True ( ex . Message . IndexOf ( "'min pool size'" ) != - 1 ) ;
728+ Assert . True ( ex . Message . IndexOf ( "'min pool size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
729729 Assert . Null ( ex . ParamName ) ;
730730
731731 // Value was either too large or too small for an Int32
@@ -750,7 +750,7 @@ public void ConnectionString_MultipleActiveResultSets_Invalid()
750750 // Invalid value for key 'multiple active result sets'
751751 Assert . Null ( ex . InnerException ) ;
752752 Assert . NotNull ( ex . Message ) ;
753- Assert . True ( ex . Message . IndexOf ( "'multiple active result sets'" ) != - 1 ) ;
753+ Assert . True ( ex . Message . IndexOf ( "'multiple active result sets'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
754754 Assert . Null ( ex . ParamName ) ;
755755 }
756756
@@ -781,7 +781,7 @@ public void ConnectionString_PacketSize_Invalid()
781781 // integer >= 512 and <= 32768
782782 Assert . Null ( ex . InnerException ) ;
783783 Assert . NotNull ( ex . Message ) ;
784- Assert . True ( ex . Message . IndexOf ( "'Packet Size'" ) != - 1 ) ;
784+ Assert . True ( ex . Message . IndexOf ( "'Packet Size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
785785 Assert . Null ( ex . ParamName ) ;
786786
787787 // invalid packet size (> maximum)
@@ -790,7 +790,7 @@ public void ConnectionString_PacketSize_Invalid()
790790 // integer >= 512 and <= 32768
791791 Assert . Null ( ex . InnerException ) ;
792792 Assert . NotNull ( ex . Message ) ;
793- Assert . True ( ex . Message . IndexOf ( "'Packet Size'" ) != - 1 ) ;
793+ Assert . True ( ex . Message . IndexOf ( "'Packet Size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
794794 Assert . Null ( ex . ParamName ) ;
795795
796796 // overflow
@@ -799,7 +799,7 @@ public void ConnectionString_PacketSize_Invalid()
799799 Assert . NotNull ( ex . InnerException ) ;
800800 Assert . Equal ( typeof ( OverflowException ) , ex . InnerException . GetType ( ) ) ;
801801 Assert . NotNull ( ex . Message ) ;
802- Assert . True ( ex . Message . IndexOf ( "'packet size'" ) != - 1 ) ;
802+ Assert . True ( ex . Message . IndexOf ( "'packet size'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
803803 Assert . Null ( ex . ParamName ) ;
804804
805805 // Value was either too large or too small for an Int32
@@ -849,7 +849,7 @@ public void ConnectionString_UserInstance_Invalid()
849849 // Invalid value for key 'user instance'
850850 Assert . Null ( ex . InnerException ) ;
851851 Assert . NotNull ( ex . Message ) ;
852- Assert . True ( ex . Message . IndexOf ( "'user instance'" ) != - 1 ) ;
852+ Assert . True ( ex . Message . IndexOf ( "'user instance'" , StringComparison . OrdinalIgnoreCase ) != - 1 ) ;
853853 Assert . Null ( ex . ParamName ) ;
854854 }
855855
@@ -1009,7 +1009,7 @@ public void ConnectionString_IPAddressPreference_Invalid(string value)
10091009 // Invalid value for key 'ip address preference'
10101010 Assert . Null ( ex . InnerException ) ;
10111011 Assert . NotNull ( ex . Message ) ;
1012- Assert . Contains ( "'ip address preference'" , ex . Message ) ;
1012+ Assert . Contains ( "'ip address preference'" , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
10131013 Assert . Null ( ex . ParamName ) ;
10141014 }
10151015 }
0 commit comments