From da5ca55a1b9c3c4540ac0efded5be20befcb3e5a Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 29 Jan 2023 12:37:10 +0000 Subject: [PATCH] Create scaffold for min sizes multi panel tests --- UnitTests/TileViewTests.cs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/UnitTests/TileViewTests.cs b/UnitTests/TileViewTests.cs index b4926c556..27a1884df 100644 --- a/UnitTests/TileViewTests.cs +++ b/UnitTests/TileViewTests.cs @@ -903,7 +903,38 @@ namespace UnitTests { └────┴───┘ "; TestHelpers.AssertDriverContentsAre (looksLike, output); + } + [Fact,AutoInitShutdown] + public void Test5Panel_MinSizes_VerticalSplitters() + { + + var tv = new TileView (5){ Width = 25, Height = 4, ColorScheme = new ColorScheme (), IntegratedBorder = BorderStyle.Single }; + + tv.Tiles.ElementAt (0).View.Add (new Label(new string('1',100)){AutoSize=false,Width=Dim.Fill(),Height = 1}); + tv.Tiles.ElementAt (1).View.Add (new Label(new string('2',100)){AutoSize=false,Width=Dim.Fill(),Height = 1}); + tv.Tiles.ElementAt (2).View.Add (new Label(new string('3',100)){AutoSize=false,Width=Dim.Fill(),Height = 1}); + tv.Tiles.ElementAt (3).View.Add (new Label(new string('4',100)){AutoSize=false,Width=Dim.Fill(),Height = 1}); + tv.Tiles.ElementAt (4).View.Add (new Label(new string('5',100)){AutoSize=false,Width=Dim.Fill(),Height = 1}); + + Application.Top.Add (tv); + tv.BeginInit (); + tv.EndInit (); + tv.LayoutSubviews (); + + + tv.Redraw (tv.Bounds); + + var looksLike = +@" +┌────┬────┬────┬────┬───┐ +│1111│2222│3333│4444│555│ +│ │ │ │ │ │ +└────┴────┴────┴────┴───┘ +"; + TestHelpers.AssertDriverContentsAre (looksLike, output); + + // TODO : Apply min sizes and create test assertions } [Fact, AutoInitShutdown]