Browse Source

Added one more unit test.

BDisp 2 years ago
parent
commit
6a509bd0f2
1 changed files with 29 additions and 0 deletions
  1. 29 0
      UnitTests/ScrollViewTests.cs

+ 29 - 0
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);
 		}
 	}