From 6a509bd0f268fe7db45a8c4c1385bc13745f1abf Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 26 Oct 2022 12:34:13 +0100 Subject: [PATCH] Added one more unit test. --- UnitTests/ScrollViewTests.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/UnitTests/ScrollViewTests.cs b/UnitTests/ScrollViewTests.cs index 8fa8ae381..55085f017 100644 --- a/UnitTests/ScrollViewTests.cs +++ b/UnitTests/ScrollViewTests.cs @@ -213,6 +213,35 @@ namespace Terminal.Gui.Views { ┴ ▼ ◄├─────┤► +", output); + } + + [Fact, AutoInitShutdown] + public void ContentSize_AutoHideScrollBars_ShowHorizontalScrollIndicator_ShowVerticalScrollIndicator () + { + var sv = new ScrollView { + Width = 10, + Height = 10, + ContentSize = new Size (50, 50) + }; + + Application.Top.Add (sv); + Application.Begin (Application.Top); + + Assert.True (sv.AutoHideScrollBars); + Assert.True (sv.ShowHorizontalScrollIndicator); + Assert.True (sv.ShowVerticalScrollIndicator); + GraphViewTests.AssertDriverContentsWithFrameAre (@" + ▲ + ┬ + ┴ + ░ + ░ + ░ + ░ + ░ + ▼ +◄├┤░░░░░► ", output); } }