mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
WIP: More refining
This commit is contained in:
@@ -21,7 +21,7 @@ public class ApplicationNavigationTests (ITestOutputHelper output)
|
||||
public void GetDeepestFocusedSubview_ShouldReturnSameView_WhenNoSubviewsHaveFocus ()
|
||||
{
|
||||
// Arrange
|
||||
var view = new View () { Id = "view", CanFocus = true };;
|
||||
var view = new View () { Id = "view", CanFocus = true }; ;
|
||||
|
||||
// Act
|
||||
var result = ApplicationNavigation.GetDeepestFocusedSubview (view);
|
||||
@@ -34,10 +34,10 @@ public class ApplicationNavigationTests (ITestOutputHelper output)
|
||||
public void GetDeepestFocusedSubview_ShouldReturnFocusedSubview ()
|
||||
{
|
||||
// Arrange
|
||||
var parentView = new View () { Id = "parentView", CanFocus = true };;
|
||||
var childView1 = new View () { Id = "childView1", CanFocus = true };;
|
||||
var childView2 = new View () { Id = "childView2", CanFocus = true };;
|
||||
var grandChildView = new View () { Id = "grandChildView", CanFocus = true };;
|
||||
var parentView = new View () { Id = "parentView", CanFocus = true }; ;
|
||||
var childView1 = new View () { Id = "childView1", CanFocus = true }; ;
|
||||
var childView2 = new View () { Id = "childView2", CanFocus = true }; ;
|
||||
var grandChildView = new View () { Id = "grandChildView", CanFocus = true }; ;
|
||||
|
||||
parentView.Add (childView1, childView2);
|
||||
childView2.Add (grandChildView);
|
||||
@@ -55,17 +55,17 @@ public class ApplicationNavigationTests (ITestOutputHelper output)
|
||||
public void GetDeepestFocusedSubview_ShouldReturnDeepestFocusedSubview ()
|
||||
{
|
||||
// Arrange
|
||||
var parentView = new View () { Id = "parentView", CanFocus = true };;
|
||||
var childView1 = new View () { Id = "childView1", CanFocus = true };;
|
||||
var childView2 = new View () { Id = "childView2", CanFocus = true };;
|
||||
var grandChildView = new View () { Id = "grandChildView", CanFocus = true };;
|
||||
var greatGrandChildView = new View () { Id = "greatGrandChildView", CanFocus = true };;
|
||||
var parentView = new View () { Id = "parentView", CanFocus = true }; ;
|
||||
var childView1 = new View () { Id = "childView1", CanFocus = true }; ;
|
||||
var childView2 = new View () { Id = "childView2", CanFocus = true }; ;
|
||||
var grandChildView = new View () { Id = "grandChildView", CanFocus = true }; ;
|
||||
var greatGrandChildView = new View () { Id = "greatGrandChildView", CanFocus = true }; ;
|
||||
|
||||
parentView.Add (childView1, childView2);
|
||||
childView2.Add (grandChildView);
|
||||
grandChildView.Add (greatGrandChildView);
|
||||
|
||||
grandChildView.SetFocus();
|
||||
grandChildView.SetFocus ();
|
||||
|
||||
// Act
|
||||
var result = ApplicationNavigation.GetDeepestFocusedSubview (parentView);
|
||||
@@ -152,8 +152,8 @@ public class ApplicationNavigationTests (ITestOutputHelper output)
|
||||
{
|
||||
// Arrange
|
||||
var top = new Toplevel ();
|
||||
var view1 = new View () { Id = "view1", CanFocus = true };
|
||||
var view2 = new View () { Id = "view2", CanFocus = true };
|
||||
var view1 = new View () { Id = "view1", CanFocus = true, TabStop = TabBehavior.TabGroup };
|
||||
var view2 = new View () { Id = "view2", CanFocus = true, TabStop = TabBehavior.TabGroup };
|
||||
top.Add (view1, view2);
|
||||
Application.Top = top;
|
||||
Application.Current = top;
|
||||
|
||||
Reference in New Issue
Block a user