GetFocused() -> back to Focused property (get only; computed).

This commit is contained in:
Tig
2024-08-18 15:45:26 -06:00
parent f6664bdc73
commit 591baa65f0
26 changed files with 203 additions and 148 deletions

View File

@@ -26,11 +26,11 @@ public class AppendAutocompleteTests (ITestOutputHelper output)
Assert.Equal ("f", tf.Text);
// Still has focus though
Assert.Same (tf, Application.Top.GetFocused ());
Assert.Same (tf, Application.Top.Focused);
// But can tab away
Application.Driver?.SendKeys ('\t', ConsoleKey.Tab, false, false, false);
Assert.NotSame (tf, Application.Top.GetFocused ());
Assert.NotSame (tf, Application.Top.Focused);
Application.Top.Dispose ();
}
@@ -201,11 +201,11 @@ public class AppendAutocompleteTests (ITestOutputHelper output)
Assert.Equal ("fish", tf.Text);
// Tab should autcomplete but not move focus
Assert.Same (tf, Application.Top.GetFocused ());
Assert.Same (tf, Application.Top.Focused);
// Second tab should move focus (nothing to autocomplete)
Application.Driver?.SendKeys ('\t', ConsoleKey.Tab, false, false, false);
Assert.NotSame (tf, Application.Top.GetFocused ());
Assert.NotSame (tf, Application.Top.Focused);
Application.Top.Dispose ();
}
@@ -238,7 +238,7 @@ public class AppendAutocompleteTests (ITestOutputHelper output)
Application.Begin (top);
Assert.Same (tf, top.GetFocused ());
Assert.Same (tf, top.Focused);
return tf;
}