mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Address CA1829 (Avoiding Count LINQ method calls when equivalent + more efficient properties exist) (#1961)
* Address CA1829 (Avoid Count LINQ Method Calls) * Remove other change * CA1829 removal * CA1829 (remove whitespace)
This commit is contained in:
@@ -42,9 +42,9 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.LanguageServer
|
||||
|
||||
AutoCompletionResult result = completionService.CreateCompletions(connectionInfo, docInfo, useLowerCaseSuggestions);
|
||||
Assert.NotNull(result);
|
||||
var count = result.CompletionItems == null ? 0 : result.CompletionItems.Count();
|
||||
var count = result.CompletionItems == null ? 0 : result.CompletionItems.Length;
|
||||
|
||||
Assert.That(count, Is.Not.EqualTo(defaultCompletionList.Count()));
|
||||
Assert.That(count, Is.Not.EqualTo(defaultCompletionList.Length));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -65,7 +65,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.LanguageServer
|
||||
|
||||
AutoCompletionResult result = completionService.CreateCompletions(connectionInfo, docInfo, useLowerCaseSuggestions);
|
||||
Assert.NotNull(result);
|
||||
Assert.AreEqual(result.CompletionItems.Count(), defaultCompletionList.Count());
|
||||
Assert.AreEqual(result.CompletionItems.Length, defaultCompletionList.Length);
|
||||
Thread.Sleep(3000);
|
||||
Assert.True(connectionInfo.IntellisenseMetrics.Quantile.Any());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user