|
@@ -1,6 +1,7 @@
|
|
using System;
|
|
using System;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using Terminal.Gui;
|
|
using Terminal.Gui;
|
|
|
|
+using Terminal.Gui.Graphs;
|
|
using Xunit;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
using Xunit.Abstractions;
|
|
|
|
|
|
@@ -864,6 +865,28 @@ namespace UnitTests {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ [Fact,AutoInitShutdown]
|
|
|
|
+ public void TestIsRoot_Yes()
|
|
|
|
+ {
|
|
|
|
+ var tv = new TileView{Width=10,Height=5,ColorScheme = new ColorScheme(),IntegratedBorder = BorderStyle.Single};
|
|
|
|
+ var tv2 = new TileView{Width=10,Height=5,ColorScheme = new ColorScheme(),IntegratedBorder = BorderStyle.Single,Orientation = Orientation.Horizontal};
|
|
|
|
+
|
|
|
|
+ Assert.True(tv.IsRootTileView());
|
|
|
|
+
|
|
|
|
+ tv.Tiles.ElementAt(0).View = tv2;
|
|
|
|
+
|
|
|
|
+ // tv2 is still considered a root because
|
|
|
|
+ // it was manually created by API user. That
|
|
|
|
+ // means it will not have its lines joined to
|
|
|
|
+ // parents and it is permitted to have a border
|
|
|
|
+ Assert.True(tv2.IsRootTileView());
|
|
|
|
+
|
|
|
|
+ // TODO: Test that this draws correctly with nested borders
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // TODO: Add case showing no nested borders for child splits
|
|
|
|
+ // even when IntegratedBorder is set.
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Creates a vertical orientation root container with left pane split into
|
|
/// Creates a vertical orientation root container with left pane split into
|
|
/// two (with horizontal splitter line).
|
|
/// two (with horizontal splitter line).
|