mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Reduced duplicated code by leverating Navigationdirection enum
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user