This commit is contained in:
Tig
2025-12-01 17:24:57 -07:00
parent f2a47367a5
commit 215d76645b
7 changed files with 61 additions and 36 deletions

View File

@@ -13,8 +13,6 @@ using Terminal.Gui.Views;
[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["CursorDown", "CursorDown", "CursorRight", "Enter"], Order = 1)]
[assembly: ExampleDemoKeyStrokes (KeyStrokes = ["Esc"], DelayMs = 100, Order = 2)]
// Setup automatic key injection for testing
ExampleContextInjector.SetupAutomaticInjection ();
// Check for test context to determine driver
string? contextJson = Environment.GetEnvironmentVariable (ExampleContext.ENVIRONMENT_VARIABLE_NAME);
@@ -30,6 +28,9 @@ IApplication? app = Application.Create ()
.Init (driverName)
.Run<ColorPickerView> ();
// Setup automatic key injection for testing
ExampleContextInjector.SetupAutomaticInjection (app);
// Run the application with fluent API - automatically creates, runs, and disposes the runnable
Color? result = app.GetResult () as Color?;