diff --git a/UICatalog/Scenarios/TextEffectsScenario.cs b/UICatalog/Scenarios/TextEffectsScenario.cs index 14ce7c329..c660ddb5c 100644 --- a/UICatalog/Scenarios/TextEffectsScenario.cs +++ b/UICatalog/Scenarios/TextEffectsScenario.cs @@ -12,7 +12,7 @@ namespace UICatalog.Scenarios; [ScenarioCategory ("Colors")] public class TextEffectsScenario : Scenario { - private TabView tabView; + private TabView _tabView; public static bool LoopingGradient = false; @@ -48,7 +48,7 @@ public class TextEffectsScenario : Scenario }; // Creates a window that occupies the entire terminal with a title. - tabView = new TabView () + _tabView = new TabView () { Width = Dim.Fill (), Height = Dim.Fill (), @@ -75,14 +75,14 @@ public class TextEffectsScenario : Scenario { LoopingGradient = e.NewValue == CheckState.Checked; SetupGradientLineCanvas (w, w.Frame.Size); - tabView.SetNeedsDisplay (); + _tabView.SetNeedsDisplay (); }; gradientsView.Add (cbLooping); - tabView.AddTab (t1, false); + _tabView.AddTab (t1, false); - w.Add (tabView); + w.Add (_tabView); Application.Run (w); w.Dispose (); diff --git a/UnitTests/Drawing/GradientFillTests.cs b/UnitTests/Drawing/GradientFillTests.cs index fd6822539..bf0d4d0e2 100644 --- a/UnitTests/Drawing/GradientFillTests.cs +++ b/UnitTests/Drawing/GradientFillTests.cs @@ -37,12 +37,6 @@ public class GradientFillTests var bottomLeftColor = gradientFill.GetColor (bottomLeft); var bottomRightColor = gradientFill.GetColor (bottomRight); - // Validate the colors at the corners - Assert.NotNull (topLeftColor); - Assert.NotNull (topRightColor); - Assert.NotNull (bottomLeftColor); - Assert.NotNull (bottomRightColor); - // Expected colors var expectedTopLeftColor = new Terminal.Gui.Color (255, 0, 0); // Red var expectedBottomRightColor = new Terminal.Gui.Color (0, 0, 255); // Blue @@ -73,9 +67,6 @@ public class GradientFillTests var point = new Point (col, row); var color = gradientFill.GetColor (point); - // Ensure color is not null - Assert.NotNull (color); - // Check if the current color is 'more blue' and 'less red' as it goes right and down Assert.True (color.R <= previousRed, $"Failed at ({col}, {row}): {color.R} > {previousRed}"); Assert.True (color.B >= previousBlue, $"Failed at ({col}, {row}): {color.B} < {previousBlue}"); @@ -96,9 +87,6 @@ public class GradientFillTests var point = new Point (col, row); var color = gradientFill.GetColor (point); - // Ensure color is not null - Assert.NotNull (color); - // Check if the current color is 'more blue' and 'less red' as it goes right and down Assert.True (color.R <= previousRed, $"Failed at ({col}, {row}): {color.R} > {previousRed}"); Assert.True (color.B >= previousBlue, $"Failed at ({col}, {row}): {color.B} < {previousBlue}");