From c2efa8e42e7776f23a8f664746d946506351244b Mon Sep 17 00:00:00 2001 From: BDisp Date: Thu, 7 Dec 2023 14:56:01 +0000 Subject: [PATCH] Trying to fix TestTreeViewColor again. --- UnitTests/Views/TreeViewTests.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/UnitTests/Views/TreeViewTests.cs b/UnitTests/Views/TreeViewTests.cs index 2e7b0fac24..5da9f50b38 100644 --- a/UnitTests/Views/TreeViewTests.cs +++ b/UnitTests/Views/TreeViewTests.cs @@ -832,6 +832,7 @@ public void TestGetObjectRow () Assert.Null (tv.GetObjectRow (n1_2)); Assert.Equal (0, tv.GetObjectRow (n2)); } + [Fact, AutoInitShutdown] public void TestTreeViewColor () { @@ -849,8 +850,8 @@ public void TestTreeViewColor () tv.Expand (n1); tv.ColorScheme = new ColorScheme (); - tv.LayoutSubviews (); - tv.Draw (); + Application.Top.Add(tv); + Application.Begin(Application.Top); // create a new color scheme var pink = new Attribute (Color.Magenta, Color.Black); @@ -883,7 +884,7 @@ public void TestTreeViewColor () // redraw now that the custom color // delegate is registered - tv.Draw (); + Application.Refresh(); // Same text TestHelpers.AssertDriverContentsAre (@"