public void TestForegroundBrush1() { var textSettings = new TextSettings(); var textBrushes = new TextBrushes(new LogViewerSettings()); var textLine = new TextLine(new LogLine(0, 0, "foobar", LevelFlags.Fatal), _hovered, _selected, true, textSettings, textBrushes); BrushColor(textLine.ForegroundBrush).Should().Be(LogViewerSettings.DefaultFatal.ForegroundColor); textLine = new TextLine(new LogLine(0, 0, "foobar", LevelFlags.Error), _hovered, _selected, true, textSettings, textBrushes); BrushColor(textLine.ForegroundBrush).Should().Be(LogViewerSettings.DefaultError.ForegroundColor); textLine = new TextLine(new LogLine(0, 0, "foobar", LevelFlags.Warning), _hovered, _selected, true, textSettings, textBrushes); BrushColor(textLine.ForegroundBrush).Should().Be(LogViewerSettings.DefaultWarning.ForegroundColor); textLine = new TextLine(new LogLine(0, 0, "foobar", LevelFlags.Info), _hovered, _selected, true, textSettings, textBrushes); BrushColor(textLine.ForegroundBrush).Should().Be(LogViewerSettings.DefaultInfo.ForegroundColor); textLine = new TextLine(new LogLine(0, 0, "foobar", LevelFlags.Debug), _hovered, _selected, true, textSettings, textBrushes); BrushColor(textLine.ForegroundBrush).Should().Be(LogViewerSettings.DefaultDebug.ForegroundColor); textLine = new TextLine(new LogLine(0, 0, "foobar", LevelFlags.Trace), _hovered, _selected, true, textSettings, textBrushes); BrushColor(textLine.ForegroundBrush).Should().Be(LogViewerSettings.DefaultTrace.ForegroundColor); textLine = new TextLine(new LogLine(0, 0, "foobar", LevelFlags.Other), _hovered, _selected, true, textSettings, textBrushes); BrushColor(textLine.ForegroundBrush).Should().Be(LogViewerSettings.DefaultInfo.ForegroundColor); }
public void TestBackgroundBrush3() { var textSettings = new TextSettings(); var textBrushes = new TextBrushes(new LogViewerSettings()); _selected.Add(new LogLineIndex(0)); foreach (LevelFlags level in Enum.GetValues(typeof(LevelFlags))) { var textLine = new TextLine(new LogLine(0, 0, "foobar", level), _hovered, _selected, true, textSettings, textBrushes); textLine.BackgroundBrush.Should().Be(TextBrushes.SelectedBackgroundBrush); } }