Browse Source

Port TabTests and merge Dim.FillTests, remove empty ThemeTests

Co-authored-by: tig <[email protected]>
copilot-swe-agent[bot] 1 month ago
parent
commit
2710a8e315

+ 0 - 17
Tests/UnitTests/Configuration/ThemeTests.cs

@@ -1,17 +0,0 @@
-using System.Text.Json;
-using static Terminal.Gui.Configuration.ConfigurationManager;
-
-namespace Terminal.Gui.ConfigurationTests;
-
-/// <summary>
-///     Tests Settings["Theme"] and ThemeManager.Theme
-/// </summary>
-public class ThemeTests
-{
-    public static readonly JsonSerializerOptions _jsonOptions = new ()
-    {
-        Converters = { new AttributeJsonConverter (), new ColorJsonConverter () }
-    };
-
-
-}

+ 0 - 23
Tests/UnitTests/View/Layout/Dim.FillTests.cs

@@ -1,23 +0,0 @@
-using Xunit.Abstractions;
-
-namespace Terminal.Gui.LayoutTests;
-
-public class DimFillTests (ITestOutputHelper output)
-{
-    private readonly ITestOutputHelper _output = output;
-
-    [Fact]
-    public void DimFill_SizedCorrectly ()
-    {
-        var view = new View { Width = Dim.Fill (), Height = Dim.Fill (), BorderStyle = LineStyle.Single };
-        var top = new Toplevel ();
-        top.Add (view);
-
-        top.Layout ();
-
-        view.SetRelativeLayout (new (32, 5));
-        Assert.Equal (32, view.Frame.Width);
-        Assert.Equal (5, view.Frame.Height);
-        top.Dispose ();
-    }
-}

+ 15 - 0
Tests/UnitTestsParallelizable/View/Layout/Dim.FillTests.cs

@@ -161,4 +161,19 @@ public class DimFillTests (ITestOutputHelper output)
         Assert.True (view.IsInitialized);
         Assert.Equal (expectedViewBounds, view.Viewport);
     }
+
+    [Fact]
+    public void DimFill_SizedCorrectly ()
+    {
+        var view = new View { Width = Dim.Fill (), Height = Dim.Fill (), BorderStyle = LineStyle.Single };
+        var top = new Toplevel ();
+        top.Add (view);
+
+        top.Layout ();
+
+        view.SetRelativeLayout (new (32, 5));
+        Assert.Equal (32, view.Frame.Width);
+        Assert.Equal (5, view.Frame.Height);
+        top.Dispose ();
+    }
 }

+ 2 - 2
Tests/UnitTests/Views/TabTests.cs → Tests/UnitTestsParallelizable/Views/TabTests.cs

@@ -1,6 +1,6 @@
-namespace Terminal.Gui.ViewsTests;
+namespace Terminal.Gui.ViewsTests;
 
-public class TabTests
+public class TabTests : UnitTests.Parallelizable.ParallelizableBase
 {
     [Fact]
     public void Constructor_Defaults ()