WIP: More refining

This commit is contained in:
Tig
2024-07-29 10:17:10 -04:00
parent 65592b4135
commit f2eb9ce6e2
24 changed files with 149 additions and 96 deletions

View File

@@ -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;