Skip to content

Commit c1ac6c3

Browse files
committed
More tests
1 parent 5ac8708 commit c1ac6c3

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/FirebirdSql.Data.FirebirdClient.Tests/FbBatchCommandTests.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff 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())

0 commit comments

Comments
 (0)