Reduced duplicated code by leverating Navigationdirection enum

This commit is contained in:
Tig
2024-07-25 16:37:22 -06:00
parent 4b785c8f7c
commit 66f83ad2e6
9 changed files with 100 additions and 201 deletions

View File

@@ -54,9 +54,9 @@ public class DatePickerTests
Application.Begin (top);
// Set focus to next month button
datePicker.FocusNext ();
datePicker.FocusNext ();
datePicker.FocusNext ();
datePicker.AdvanceFocus (NavigationDirection.Forward);
datePicker.AdvanceFocus (NavigationDirection.Forward);
datePicker.AdvanceFocus (NavigationDirection.Forward);
// Change month to December
Assert.True (datePicker.NewKeyDownEvent (Key.Enter));
@@ -81,8 +81,8 @@ public class DatePickerTests
Application.Begin (top);
// set focus to the previous month button
datePicker.FocusNext ();
datePicker.FocusNext ();
datePicker.AdvanceFocus (NavigationDirection.Forward);
datePicker.AdvanceFocus (NavigationDirection.Forward);
// Change month to January
Assert.True (datePicker.NewKeyDownEvent (Key.Enter));