public void Single_highlight_rectangle_is_positioned_correctly(string text, int index) { // When box.Text = text; // Then var positionRect = PositionRect(index, 3); Highlights.First().Should().BeAtPosition(positionRect); }
public void Highlights_update_when_textbox_is_scrolled() { // Given box.Text = "MISS, HIT, MISS"; box.Width = 20; var originalPosition = Canvas.GetLeft(Highlights.First()); // When internalTextBox.ScrollToHorizontalOffset(10); internalTextBox.UpdateLayout(); // Then var positionAfterScroll = Canvas.GetLeft(Highlights.First()); positionAfterScroll.Should().Be(originalPosition - 10); }