From 1a4cf439d01ee2f03621706138da5bc02d437609 Mon Sep 17 00:00:00 2001 From: Tig Date: Thu, 30 May 2024 10:56:08 -0600 Subject: [PATCH] Fixed PaddingTests --- UnitTests/View/Adornment/PaddingTests.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/UnitTests/View/Adornment/PaddingTests.cs b/UnitTests/View/Adornment/PaddingTests.cs index f1fb48073..4f7bffb20 100644 --- a/UnitTests/View/Adornment/PaddingTests.cs +++ b/UnitTests/View/Adornment/PaddingTests.cs @@ -2,22 +2,19 @@ namespace Terminal.Gui.ViewTests; -public class PaddingTests +public class PaddingTests (ITestOutputHelper output) { - private readonly ITestOutputHelper _output; - public PaddingTests (ITestOutputHelper output) { _output = output; } - [Fact] [SetupFakeDriver] public void Padding_Uses_Parent_ColorScheme () { ((FakeDriver)Application.Driver).SetBufferSize (5, 5); var view = new View { Height = 3, Width = 3 }; - view.Padding.Thickness = new Thickness (1); + view.Padding.Thickness = new (1); - view.ColorScheme = new ColorScheme + view.ColorScheme = new() { - Normal = new Attribute (Color.Red, Color.Green), Focus = new Attribute (Color.Green, Color.Red) + Normal = new (Color.Red, Color.Green), Focus = new (Color.Green, Color.Red) }; Assert.Equal (ColorName.Red, view.Padding.GetNormalColor ().Foreground.GetClosestNamedColor ()); @@ -34,7 +31,7 @@ public class PaddingTests PPP P P PPP", - _output + output ); TestHelpers.AssertDriverAttributesAre ("0", null, view.GetNormalColor ()); }