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 5
5
using MySql . Data . MySqlClient ;
6
6
using Xunit ;
7
7
using Dapper ;
8
+ using Xunit . Sdk ;
8
9
9
10
namespace SideBySide
10
11
{
@@ -158,7 +159,14 @@ public async Task BulkLoadCsvFileNotFound()
158
159
159
160
if ( ! ( exception is FileNotFoundException ) )
160
161
{
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
+ }
162
170
Assert . Contains ( "No such file or directory" , exception . Message ) ;
163
171
}
164
172
}
Original file line number Diff line number Diff line change 4
4
using MySql . Data . MySqlClient ;
5
5
using Xunit ;
6
6
using Dapper ;
7
+ using Xunit . Sdk ;
7
8
8
9
namespace SideBySide
9
10
{
@@ -160,7 +161,14 @@ public void BulkLoadCsvFileNotFound()
160
161
161
162
if ( ! ( exception is FileNotFoundException ) )
162
163
{
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
+ }
164
172
Assert . Contains ( "No such file or directory" , exception . Message ) ;
165
173
}
166
174
}
You can’t perform that action at this time.
0 commit comments