Esempio n. 1
0
 private void OpenExisting(string path)
 {
     _window = new ConfigurationWindow(new string[] {});
     _window.DisableBackupAndChorusStuffForTests();
     _window.Show();
     _window.OpenProject(path);
 }
Esempio n. 2
0
 public void Setup()
 {
     ErrorReport.IsOkToInteractWithUser = false;
     Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Initialize();
     _window = new ConfigurationWindow(new string[] {});
     _window.DisableBackupAndChorusStuffForTests();
     _window.Show();
 }
Esempio n. 3
0
 private ComboBoxTester CreateNewAndGetLanguageCombo(string path)
 {
     _window = new ConfigurationWindow(new string[] {});
     _window.DisableBackupAndChorusStuffForTests();
     _window.Show();
     _window.CreateAndOpenProject(path, "th", "Thai");
     GoToUILanguageTab();
     return(new ComboBoxTester("_languageCombo", _window));
 }
Esempio n. 4
0
 public void ProjectIsCreated()
 {
     using (TemporaryFolder f = new TemporaryFolder("ProjectIsCreatedTest"))
     {
         _window.CreateAndOpenProject(f.Path, "th", "Thai");
         _window.DisableBackupAndChorusStuffForTests();
         _window.Close();
         _window.Dispose();
     }
 }
Esempio n. 5
0
        public override void Setup()
        {
            Palaso.Reporting.ErrorReport.IsOkToInteractWithUser = false;
            ErrorReport.IsOkToInteractWithUser = false;
            base.Setup();
            Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Initialize();
            _window = new ConfigurationWindow(new string[] {});
            _window.DisableBackupAndChorusStuffForTests();
            _window.Show();
            _mainWindowTester = new FormTester(_window.Name, _window);

            _projectFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
        }
Esempio n. 6
0
        public void OpenProject_OpenedWithDirNameWhichDoesNotMatchProjectName_Opens()
        {
            using (var projectDir = new ProjectDirectorySetupForTesting(""))
            {
                Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Initialize();
                using (var window = new ConfigurationWindow(new string[] { }))
                {
                    Assert.AreNotEqual(
                        Path.GetFileNameWithoutExtension(projectDir.PathToLiftFile),
                        Path.GetFileName(projectDir.PathToDirectory));

                    window.DisableBackupAndChorusStuffForTests();
                    window.Show();
                    Assert.IsTrue(window.OpenProject(projectDir.PathToDirectory));
                }
                Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Shutdown();
            }
        }