예제 #1
0
        public void ProjectFilesTouched()
        {
            _window.OpenProject(BasilProject.GetPretendProjectDirectory());
            string   p      = WeSayWordsProject.Project.PathToConfigFile;
            DateTime before = File.GetLastWriteTime(p);

            _mainWindowTester.Close();
            DateTime after = File.GetLastWriteTime(p);

            Assert.AreNotEqual(before, after);
        }
예제 #2
0
 private void OpenExisting(string path)
 {
     _window = new ConfigurationWindow(new string[] {});
     _window.DisableBackupAndChorusStuffForTests();
     _window.Show();
     _window.OpenProject(path);
 }
예제 #3
0
//
//        private ComboBoxTester GoToTabAndGetLanguageCombo()
//        {
//            GoToBackupTab();
//            ComboBoxTester t = new ComboBoxTester("_languageCombo", _window);
//            return t;
//        }

        private void OpenExisting(string path)
        {
            _window = new ConfigurationWindow(new string[] { });
            _window.Show();
            _window = new ConfigurationWindow(new string[] { });
            _window.Show();
            _window.OpenProject(path);
        }
        public void WalkTabsAfterOpeningPretendProject()
        {
            _window.OpenProject(BasilProject.GetPretendProjectDirectory());
            File.Copy(
                Path.Combine(WeSayWordsProject.Project.ApplicationTestDirectory,
                             "PRETEND.WeSayConfig"),
                WeSayWordsProject.Project.PathToConfigFile,
                true);

            ToolStrip toolstrip = (ToolStrip)_window.Controls.Find("_areasToolStrip", true)[0];

            foreach (ToolStripButton button in toolstrip.Items)
            {
                button.PerformClick();
            }
        }
예제 #5
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();
            }
        }
예제 #6
0
//
//        private ComboBoxTester GoToTabAndGetLanguageCombo()
//        {
//            GoToBackupTab();
//            ComboBoxTester t = new ComboBoxTester("_languageCombo", _window);
//            return t;
//        }

		private void OpenExisting(string path)
		{
			_window = new ConfigurationWindow(new string[] { });
			_window.Show();
			_window = new ConfigurationWindow(new string[] { });
			_window.Show();
			_window.OpenProject(path);
		}