File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 55using MySql . Data . MySqlClient ;
66using Xunit ;
77using Dapper ;
8+ using Xunit . Sdk ;
89
910namespace SideBySide
1011{
@@ -158,7 +159,14 @@ public async Task BulkLoadCsvFileNotFound()
158159
159160 if ( ! ( exception is FileNotFoundException ) )
160161 {
161- Assert . Contains ( "Errcode: 2 " , exception . Message ) ;
162+ try
163+ {
164+ Assert . Contains ( "Errcode: 2 " , exception . Message , StringComparison . OrdinalIgnoreCase ) ;
165+ }
166+ catch ( ContainsException )
167+ {
168+ Assert . Contains ( "OS errno 2 " , exception . Message , StringComparison . OrdinalIgnoreCase ) ;
169+ }
162170 Assert . Contains ( "No such file or directory" , exception . Message ) ;
163171 }
164172 }
Original file line number Diff line number Diff line change 44using MySql . Data . MySqlClient ;
55using Xunit ;
66using Dapper ;
7+ using Xunit . Sdk ;
78
89namespace SideBySide
910{
@@ -160,7 +161,14 @@ public void BulkLoadCsvFileNotFound()
160161
161162 if ( ! ( exception is FileNotFoundException ) )
162163 {
163- Assert . Contains ( "Errcode: 2 " , exception . Message ) ;
164+ try
165+ {
166+ Assert . Contains ( "Errcode: 2 " , exception . Message , StringComparison . OrdinalIgnoreCase ) ;
167+ }
168+ catch ( ContainsException )
169+ {
170+ Assert . Contains ( "OS errno 2 " , exception . Message , StringComparison . OrdinalIgnoreCase ) ;
171+ }
164172 Assert . Contains ( "No such file or directory" , exception . Message ) ;
165173 }
166174 }
You can’t perform that action at this time.
0 commit comments