File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11using Microsoft . VisualStudio . TestTools . UnitTesting ;
22using System . Collections . Generic ;
3+ using System . Threading . Tasks ;
34
45namespace QueryDB . Core . Tests
56{
@@ -21,6 +22,18 @@ public void ExecuteCommand_UnknownDB_ReturnsNegativeOne()
2122 Assert . AreEqual ( - 1 , result ) ;
2223 }
2324
25+ [ TestMethod ]
26+ [ TestCategory ( DB_TESTS ) , TestCategory ( UNKNOW_DB_TESTS ) ]
27+ public async Task ExecuteCommandAsync_UnknownDB_ReturnsNegativeOne ( )
28+ {
29+ string sqlStatement = "DELETE FROM users" ;
30+
31+ var dbContext = new DBContext ( ( DB ) 999 , "some_invalid_connection_string" ) ;
32+ var result = await dbContext . ExecuteCommandAsync ( sqlStatement ) ;
33+
34+ Assert . AreEqual ( - 1 , result ) ;
35+ }
36+
2437 [ TestMethod ]
2538 [ TestCategory ( DB_TESTS ) , TestCategory ( UNKNOW_DB_TESTS ) ]
2639 public void ExecuteTransaction_UnknownDB_ReturnsFalse ( )
You can’t perform that action at this time.
0 commit comments