File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
src/FirebirdSql.Data.FirebirdClient.Tests Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -289,8 +289,9 @@ public async Task BigBatch()
289289 Assert . IsTrue ( result . AllSuccess ) ;
290290 }
291291 }
292+
292293 [ Test ]
293- public async Task EnsureSuccess ( )
294+ public async Task EnsureSuccessThrow ( )
294295 {
295296 await EmptyTable ( ) ;
296297
@@ -305,6 +306,22 @@ public async Task EnsureSuccess()
305306 }
306307 }
307308
309+ [ Test ]
310+ public async Task EnsureSuccessNoThrow ( )
311+ {
312+ await EmptyTable ( ) ;
313+
314+ await using ( var cmd = Connection . CreateBatchCommand ( ) )
315+ {
316+ cmd . CommandText = "insert into batch (i) values (@i)" ;
317+ var batch1 = cmd . AddBatchParameters ( ) ;
318+ batch1 . Add ( "i" , 20 ) ;
319+ var result = await cmd . ExecuteNonQueryAsync ( ) ;
320+
321+ Assert . DoesNotThrow ( result . EnsureSuccess ) ;
322+ }
323+ }
324+
308325 async Task EmptyTable ( )
309326 {
310327 await using ( var cmd = Connection . CreateCommand ( ) )
You can’t perform that action at this time.
0 commit comments