private void VerifyThemeColors(Color textColor, IThemeColors expectedTheme) { var originalLineSource = CreateFormattedLineSource(14d, "Times New Roman", textColor); var locViz = CreateLocationViz(CreateSnapshot(), new Span(0, 1), stepNumber: 99); var testSubject = new IssueLocationAdornment(locViz, originalLineSource); testSubject.Background.Should().Be(expectedTheme.BackgroundBrush); testSubject.BorderBrush.Should().Be(expectedTheme.BorderBrush); }
public void Ctor_Initialization() { var fontSize = 14d; var locViz = CreateLocationViz(CreateSnapshot(), new Span(0, 1), stepNumber: 99); var formattedLineSource = CreateFormattedLineSource(fontSize, "Times New Roman"); // Act var testSubject = new IssueLocationAdornment(locViz, formattedLineSource); var textContent = testSubject.Child as TextBlock; textContent.Should().NotBeNull(); var expectedFontSize = fontSize - 2; textContent.FontSize.Should().Be(expectedFontSize); textContent.FontFamily.ToString().Should().Be("Times New Roman"); textContent.Text.Should().Be("99"); }
public void Update_SetsExpectedProperties() { var locViz = CreateLocationViz(CreateSnapshot(), new Span(0, 1), stepNumber: 99); var originalLineSource = CreateFormattedLineSource(14d, "Times New Roman"); var testSubject = new IssueLocationAdornment(locViz, originalLineSource); // Act var newFontSize = 10d; var newLineSource = CreateFormattedLineSource(newFontSize, "Arial"); testSubject.Update(newLineSource); var textContent = testSubject.Child as TextBlock; var expectedFontSize = newFontSize - 2; textContent.FontSize.Should().Be(expectedFontSize); textContent.FontFamily.ToString().Should().Be("Arial"); }