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");
     }
 }
Beispiel #2
0
        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;
            }
        }
Beispiel #3
0
 public void Test(FrameworkId frameworkId)
 {
     var window = GetMainWindow(frameworkId);
 }