public async Task ToggleHistoryEntriesRangeSelectionDown(int[] linesToSelect, string selectedText) { var input = @"f <- function() { print(42) } g <- function() { print(7*9) } h <- function() { print(42) }"; _history.AddToHistory(input); foreach (var line in linesToSelect) { _history.ToggleHistoryEntrySelection(line); } await DoEvents(); _history.ToggleHistoryEntriesRangeSelectionDown(); await DoEvents(); _history.GetSelectedHistoryEntrySpans().Should().ContainSingle() .Which.GetText().Should().Be(selectedText); }