|
@@ -393,9 +393,9 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
|
|
|
// Is the selected tab view hosting focused
|
|
|
Assert.Equal (tab1, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
- Assert.Equal (tv.SelectedTab.View, top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
+ Assert.Equal (tv.SelectedTab.View, top.Focused.GetMostFocused ());
|
|
|
|
|
|
// Press the cursor up key to focus the selected tab
|
|
|
Application.OnKeyDown (Key.CursorUp);
|
|
@@ -403,8 +403,8 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
|
|
|
// Is the selected tab focused
|
|
|
Assert.Equal (tab1, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
|
|
|
Tab oldChanged = null;
|
|
|
Tab newChanged = null;
|
|
@@ -421,8 +421,8 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
Assert.Equal (tab1, oldChanged);
|
|
|
Assert.Equal (tab2, newChanged);
|
|
|
Assert.Equal (tab2, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
|
|
|
// Press the cursor down key. Since the selected tab has no focusable views, the focus should move to the next view in the toplevel
|
|
|
Application.OnKeyDown (Key.CursorDown);
|
|
@@ -454,7 +454,7 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
// Press the cursor down key again will focus next view in the toplevel, whic is the TabView
|
|
|
Application.OnKeyDown (Key.CursorDown);
|
|
|
Assert.Equal (tab2, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
Assert.Equal (tab1, tv.GetMostFocused ());
|
|
|
|
|
|
// Press the cursor down key to focus the selected tab view hosting again
|
|
@@ -468,8 +468,8 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
|
|
|
// Is the selected tab focused
|
|
|
Assert.Equal (tab2, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
|
|
|
// Press the cursor left key to select the previous tab
|
|
|
Application.OnKeyDown (Key.CursorLeft);
|
|
@@ -477,8 +477,8 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
Assert.Equal (tab2, oldChanged);
|
|
|
Assert.Equal (tab1, newChanged);
|
|
|
Assert.Equal (tab1, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
|
|
|
// Press the end key to select the last tab
|
|
|
Application.OnKeyDown (Key.End);
|
|
@@ -486,8 +486,8 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
Assert.Equal (tab1, oldChanged);
|
|
|
Assert.Equal (tab2, newChanged);
|
|
|
Assert.Equal (tab2, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
|
|
|
// Press the home key to select the first tab
|
|
|
Application.OnKeyDown (Key.Home);
|
|
@@ -495,8 +495,8 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
Assert.Equal (tab2, oldChanged);
|
|
|
Assert.Equal (tab1, newChanged);
|
|
|
Assert.Equal (tab1, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
|
|
|
// Press the page down key to select the next set of tabs
|
|
|
Application.OnKeyDown (Key.PageDown);
|
|
@@ -504,8 +504,8 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
Assert.Equal (tab1, oldChanged);
|
|
|
Assert.Equal (tab2, newChanged);
|
|
|
Assert.Equal (tab2, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
|
|
|
// Press the page up key to select the previous set of tabs
|
|
|
Application.OnKeyDown (Key.PageUp);
|
|
@@ -513,8 +513,8 @@ public class TabViewTests (ITestOutputHelper output)
|
|
|
Assert.Equal (tab2, oldChanged);
|
|
|
Assert.Equal (tab1, newChanged);
|
|
|
Assert.Equal (tab1, tv.SelectedTab);
|
|
|
- Assert.Equal (tv, top.GetFocused ());
|
|
|
- Assert.Equal (tv.GetMostFocused (), top.GetFocused ().GetMostFocused ());
|
|
|
+ Assert.Equal (tv, top.Focused);
|
|
|
+ Assert.Equal (tv.GetMostFocused (), top.Focused.GetMostFocused ());
|
|
|
top.Dispose ();
|
|
|
}
|
|
|
|