mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Fix for multiple parameter error. (#1082)
* Clearing first use of parameters * restore space * added finally block * Added try catch block in correct position * fixed spacing * added space before try * duplicate row check simplified by Alan * Revert "duplicate row check simplified by Alan" This reverts commit 445ac506bd96b353266778abd0cf9bad2be2a3c3. * removed exception and changed message * added exception back for test purposes * added working executescalar * Added "<=" for delete action that deletes nothing. * spacing fix for check duplicate * Added comments and changed function logic. * added clarifying message * Added new extended class * small space fix
This commit is contained in:
@@ -83,7 +83,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.EditData
|
||||
RowDelete rd = new RowDelete(0, rs, data.TableMetadata);
|
||||
|
||||
// ... Mock db connection for building the command
|
||||
var mockConn = new TestSqlConnection(null);
|
||||
var mockConn = new TestEditDataSqlConnection(null);
|
||||
|
||||
// If: I attempt to get a command for the edit
|
||||
DbCommand cmd = rd.GetCommand(mockConn);
|
||||
@@ -235,7 +235,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.EditData
|
||||
Assert.AreEqual(expectedKeys, whereComponents.Length);
|
||||
|
||||
// ... Mock db connection for building the command
|
||||
var mockConn = new TestSqlConnection(new[] { testResultSet });
|
||||
var mockConn = new TestEditDataSqlConnection(new[] { testResultSet });
|
||||
|
||||
// If: I attempt to get a command for a simulated delete of a row with duplicates.
|
||||
// Then: The Command will throw an exception as it detects there are
|
||||
|
||||
Reference in New Issue
Block a user