private void OpenExisting(string path) { _window = new ConfigurationWindow(new string[] {}); _window.DisableBackupAndChorusStuffForTests(); _window.Show(); _window.OpenProject(path); }
public void Setup() { ErrorReport.IsOkToInteractWithUser = false; Palaso.UI.WindowsForms.Keyboarding.KeyboardController.Initialize(); _window = new ConfigurationWindow(new string[] {}); _window.DisableBackupAndChorusStuffForTests(); _window.Show(); }
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)); }
public void ProjectIsCreated() { using (TemporaryFolder f = new TemporaryFolder("ProjectIsCreatedTest")) { _window.CreateAndOpenProject(f.Path, "th", "Thai"); _window.DisableBackupAndChorusStuffForTests(); _window.Close(); _window.Dispose(); } }
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()); }
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(); } }