Skip to content

Commit c0b4ca3

Browse files
committed
Test - Execute Transaction Async
1 parent 9ea10bc commit c0b4ca3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

QueryDB.Core.Tests/QueryDBTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ public void ExecuteTransaction_UnknownDB_ReturnsFalse()
4949
Assert.IsFalse(result);
5050
}
5151

52+
[TestMethod]
53+
[TestCategory(DB_TESTS), TestCategory(UNKNOW_DB_TESTS)]
54+
public async Task ExecuteTransactionAsync_UnknownDB_ReturnsFalse()
55+
{
56+
var sqlStatements = new List<string>
57+
{
58+
"DELETE FROM users"
59+
};
60+
61+
var dbContext = new DBContext((DB)999, "some_invalid_connection_string");
62+
var result = await dbContext.ExecuteTransactionAsync(sqlStatements);
63+
64+
Assert.IsFalse(result);
65+
}
66+
5267
#endregion
5368

5469
}

0 commit comments

Comments
 (0)