Fixing bug with incorrect row count returned (#58)

This commit is contained in:
Benjamin Russell
2016-09-20 21:04:22 -07:00
committed by Karl Burtram
parent bf6a0e52e2
commit 8f4caa80c2
2 changed files with 11 additions and 2 deletions

View File

@@ -70,6 +70,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution
// ... There should be a message for how many rows were affected
Assert.Equal(1, batch.ResultMessages.Count());
Assert.Contains("1 ", batch.ResultMessages.First());
// NOTE: 1 is expected because this test simulates a 'update' statement where 1 row was affected.
// The 1 in quotes is to make sure the 1 isn't part of a larger number
}
[Fact]
@@ -101,6 +104,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution
// ... There should be a message for how many rows were affected
Assert.Equal(resultSets, batch.ResultMessages.Count());
Assert.Contains(Common.StandardRows.ToString(), batch.ResultMessages.First());
}
[Fact]
@@ -145,6 +149,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.QueryExecution
// ... There should be a message for how many rows were affected
Assert.Equal(resultSets, batch.ResultMessages.Count());
foreach (var rsm in batch.ResultMessages)
{
Assert.Contains(Common.StandardRows.ToString(), rsm);
}
}
[Fact]