mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-27 00:07:58 +01:00
Remove FakeComponentFactory dependency on Examples namespace
- Removed Terminal.Gui.Examples using statement from FakeComponentFactory - Removed key injection logic from FakeComponentFactory.CreateInput() - Created ExampleContextInjector to handle key injection via Application.Driver.EnqueueKeyEvent - Updated examples to call ExampleContextInjector.SetupAutomaticInjection() before Init - This addresses @tig's comment to use Driver.EnqueueKeyEvent instead of direct FakeInput injection Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
@@ -20,6 +20,9 @@ using Terminal.Gui.Views;
|
||||
ConfigurationManager.RuntimeConfig = """{ "Theme": "Light" }""";
|
||||
ConfigurationManager.Enable (ConfigLocations.All);
|
||||
|
||||
// Setup automatic key injection for testing
|
||||
ExampleContextInjector.SetupAutomaticInjection ();
|
||||
|
||||
// Check for test context to determine driver
|
||||
string? contextJson = Environment.GetEnvironmentVariable (ExampleContext.ENVIRONMENT_VARIABLE_NAME);
|
||||
string? driverName = null;
|
||||
|
||||
Reference in New Issue
Block a user