소스 검색

Remove call to shutdown

Thomas 2 년 전
부모
커밋
431f60f361
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 3
      UnitTests/Views/TableViewTests.cs

+ 8 - 3
UnitTests/Views/TableViewTests.cs

@@ -1742,11 +1742,14 @@ namespace Terminal.Gui.ViewTests {
 			tableView.EnsureSelectedCellIsVisible ();
 			tableView.EnsureSelectedCellIsVisible ();
 			Assert.Equal (smooth ? 1 : 3, tableView.ColumnOffset);
 			Assert.Equal (smooth ? 1 : 3, tableView.ColumnOffset);
 		}
 		}
+		
 		[Fact, AutoInitShutdown]
 		[Fact, AutoInitShutdown]
 		public void LongColumnTest ()
 		public void LongColumnTest ()
 		{
 		{
 			var tableView = new TableView ();
 			var tableView = new TableView ();
-			tableView.BeginInit (); tableView.EndInit ();
+
+			Application.Top.Add(tableView);
+			Application.Begin(Application.Top);
 
 
 			tableView.ColorScheme = Colors.TopLevel;
 			tableView.ColorScheme = Colors.TopLevel;
 
 
@@ -1785,7 +1788,7 @@ namespace Terminal.Gui.ViewTests {
 			var style = tableView.Style.GetOrCreateColumnStyle (dt.Columns [2]);
 			var style = tableView.Style.GetOrCreateColumnStyle (dt.Columns [2]);
 
 
 			// one way the API user can fix this for long columns
 			// one way the API user can fix this for long columns
-			// is to specify a max width for the column
+			// is to specify a MinAcceptableWidth for the column
 			style.MaxWidth = 10;
 			style.MaxWidth = 10;
 
 
 			tableView.LayoutSubviews ();
 			tableView.LayoutSubviews ();
@@ -1848,7 +1851,9 @@ namespace Terminal.Gui.ViewTests {
 
 
 			// Now test making the width too small for the MinAcceptableWidth
 			// Now test making the width too small for the MinAcceptableWidth
 			// the Column won't fit so should not be rendered
 			// the Column won't fit so should not be rendered
-			Application.Shutdown ();
+			var driver = ((FakeDriver)Application.Driver);
+			driver.UpdateOffScreen();
+			
 
 
 			tableView.Bounds = new Rect (0, 0, 9, 5);
 			tableView.Bounds = new Rect (0, 0, 9, 5);
 			tableView.LayoutSubviews ();
 			tableView.LayoutSubviews ();