public async Task Autocomplete_WithCollectionAndPrefix_GetsFilteredAutocomplete() { var playground = PlaygroundWorkspace.FromSource(SourceCodeKind.Regular, SampleCode.CompilerTest, 174); IEnumerable <string> results; using (var autoComplete = new AutoCompleteWorkspaceService(playground)) { results = await GetAutocomplete(autoComplete); } var expected = new[] { "Add", "AddRange" }; CollectionAssert.AreEqual(expected, results); }
private async Task <IEnumerable <string> > GetAutocomplete(AutoCompleteWorkspaceService autocomplete) { var selection = await autocomplete.GetAutoCompleteAsync(); return(selection.Select(r => r.DisplayText)); }
public Analyser(PlaygroundWorkspace workspace) { Workspace = workspace; _autoComplete = new AutoCompleteWorkspaceService(workspace); }