@@ -189,7 +189,8 @@ public async Task ConflictException()
189
189
190
190
using ( var client = new CouchClient ( "http://localhost" ) )
191
191
{
192
- await Assert . ThrowsAsync < CouchConflictException > ( ( ) => client . CreateDatabaseAsync < Rebel > ( ) ) ;
192
+ var couchException = await Assert . ThrowsAsync < CouchConflictException > ( ( ) => client . CreateDatabaseAsync < Rebel > ( ) ) ;
193
+ Assert . IsType < Flurl . Http . FlurlHttpException > ( couchException . InnerException ) ;
193
194
}
194
195
}
195
196
}
@@ -203,7 +204,8 @@ public async Task NotFoundException()
203
204
204
205
using ( var client = new CouchClient ( "http://localhost" ) )
205
206
{
206
- await Assert . ThrowsAsync < CouchNotFoundException > ( ( ) => client . DeleteDatabaseAsync < Rebel > ( ) ) ;
207
+ var couchException = await Assert . ThrowsAsync < CouchNotFoundException > ( ( ) => client . DeleteDatabaseAsync < Rebel > ( ) ) ;
208
+ Assert . IsType < Flurl . Http . FlurlHttpException > ( couchException . InnerException ) ;
207
209
}
208
210
}
209
211
}
@@ -218,7 +220,8 @@ public void BadRequestException()
218
220
using ( var client = new CouchClient ( "http://localhost" ) )
219
221
{
220
222
var db = client . GetDatabase < Rebel > ( ) ;
221
- Assert . Throws < CouchNoIndexException > ( ( ) => db . UseIndex ( "aoeu" ) . ToList ( ) ) ;
223
+ var couchException = Assert . Throws < CouchNoIndexException > ( ( ) => db . UseIndex ( "aoeu" ) . ToList ( ) ) ;
224
+ Assert . IsType < Flurl . Http . FlurlHttpException > ( couchException . InnerException ) ;
222
225
}
223
226
}
224
227
}
@@ -237,6 +240,8 @@ public async Task GenericExceptionWithMessage()
237
240
var db = client . GetDatabase < Rebel > ( ) ;
238
241
var couchException = await Assert . ThrowsAsync < CouchException > ( ( ) => db . FindAsync ( "aoeu" ) ) ;
239
242
Assert . Equal ( message , couchException . Message ) ;
243
+ Assert . Equal ( reason , couchException . Reason ) ;
244
+ Assert . IsType < Flurl . Http . FlurlHttpException > ( couchException . InnerException ) ;
240
245
}
241
246
}
242
247
}
@@ -252,6 +257,7 @@ public async Task GenericExceptionNoMessage()
252
257
{
253
258
var db = client . GetDatabase < Rebel > ( ) ;
254
259
var couchException = await Assert . ThrowsAsync < CouchException > ( ( ) => db . FindAsync ( "aoeu" ) ) ;
260
+ Assert . IsType < Flurl . Http . FlurlHttpException > ( couchException . InnerException ) ;
255
261
}
256
262
}
257
263
}
0 commit comments