public static TestConfiguration Create(FrameworkId framework) { switch (framework) { case FrameworkId.Wpf: return new WpfTestConfiguration(); break; case FrameworkId.Winforms: return new WinformsTestConfiguration(); break; case FrameworkId.Silverlight: case FrameworkId.Win32: case FrameworkId.Swt: case FrameworkId.WinRT: default: throw new ArgumentOutOfRangeException("framework"); } }
public MainScreen GetMainWindow(FrameworkId framework) { try { Keyboard = Keyboard.Instance; if (!windows.ContainsKey(framework)) { var configuration = TestConfigurationFactory.Create(framework); var application = configuration.LaunchApplication(); var mainWindow = application.GetWindow(configuration.MainWindowTitle); windows.Add(framework, new MainScreen(application, mainWindow)); } return windows[framework]; } catch (Exception e) { logger.Error(e); throw; } }
public void Test(FrameworkId frameworkId) { var window = GetMainWindow(frameworkId); }